Commit fbe335a4 authored by stephgc's avatar stephgc
Browse files

Initial commit

parents
sga
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pace-2020.iml" filepath="$PROJECT_DIR$/.idea/pace-2020.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true" buildAllGenerated="true">
<generated>
<config projectName="sga" targetName="sga" />
</generated>
</component>
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="f0416398-494c-404a-9f67-661a97715f7b" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/cmake-build-debug/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
<component name="FUSProjectUsageTrigger">
<session id="-124690362">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.open.time.0" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="c" value="8" />
<entry key="h" value="5" />
<entry key="txt" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="CMakeLists.txt" value="1" />
<entry key="ObjectiveC" value="13" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="c" value="376" />
<entry key="h" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="ObjectiveC" value="377" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/separator.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="1194" selection-start-line="1194" selection-end-line="1194" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/separator.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="7" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/improve.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="147">
<caret line="42" selection-start-line="42" selection-end-line="42" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tree.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="305">
<caret line="22" column="9" selection-start-line="22" selection-start-column="9" selection-end-line="22" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/decompose.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="45" selection-start-line="45" selection-end-line="45" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/components.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574">
<caret line="236" selection-start-line="236" selection-end-line="236" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1656">
<caret line="126" column="5" selection-start-line="126" selection-start-column="5" selection-end-line="126" selection-end-column="5" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<caret line="28" lean-forward="true" selection-start-line="28" selection-end-line="28" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/graph.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="2" lean-forward="true" selection-start-line="3" selection-start-column="2" selection-end-line="3" selection-end-column="2" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/graph.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="203">
<caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>searchCriticalCorrespondant</find>
<find>nbCallsPrune</find>
<find>verifyCriticalBranch</find>
<find>treeContainsNeighbors</find>
<find>updateSetOfNodes</find>
<find>buildSetOfNodes</find>
<find>searchForks</find>
<find>exploreAndSearchForks</find>
<find>nbSwaps</find>
<find>nodesInSubtrees</find>
<find>nbDeeperN</find>
<find>limitNbDeepestNeighbors</find>
<find>nbCVerticesWithNoNeighborInAAndB</find>
<find>selectABDisconnectedVertices</find>
<find>isABetterSeparator</find>
<find>nbCallsdecreaseNbNeighborsInB</find>
<find>verifyNbNeighbors</find>
<find>nbSubtrees</find>
<find>indpdNbCalls</find>
</findStrings>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/CMakeLists.txt" />
<option value="$PROJECT_DIR$/compression.c" />
<option value="$PROJECT_DIR$/tree.c" />
<option value="$PROJECT_DIR$/tree.h" />
<option value="$PROJECT_DIR$/separator.c" />
<option value="$PROJECT_DIR$/separator.h" />
<option value="$PROJECT_DIR$/improve.c" />
<option value="$PROJECT_DIR$/decompose.c" />
<option value="$PROJECT_DIR$/components.c" />
<option value="$PROJECT_DIR$/main.c" />
<option value="$PROJECT_DIR$/main.h" />
<option value="$PROJECT_DIR$/graph.c" />
<option value="$PROJECT_DIR$/graph.h" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
<component name="ProjectFrameBounds">
<option name="x" value="124" />
<option name="y" value="23" />
<option name="width" value="1087" />
<option name="height" value="877" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="sga" type="b2602c69:ProjectViewProjectNode" />
<item name="pace-2020" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Application.sga">
<configuration name="Build All" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="sga" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="sga" TARGET_NAME="sga" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="sga" RUN_TARGET_NAME="sga">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.Build All" />
<item itemvalue="Application.sga" />
</list>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="f0416398-494c-404a-9f67-661a97715f7b" name="Default Changelist" comment="" />
<created>1591533541767</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1591533541767</updated>
<workItem from="1591533543009" duration="3760000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3760000" />
</component>
<component name="ToolWindowManager">
<frame x="124" y="23" width="1087" height="877" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24976076" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="CMake" />
<window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info anchor="bottom" id="Messages" weight="0.32939634" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32939634" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Database" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/compression.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/compression.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="21" selection-start-line="19" selection-start-column="21" selection-end-line="19" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tree.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="382">
<caret line="50" lean-forward="true" selection-start-line="50" selection-end-line="50" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tree.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="305">
<caret line="22" column="9" selection-start-line="22" selection-start-column="9" selection-end-line="22" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/separator.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="1194" selection-start-line="1194" selection-end-line="1194" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/separator.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="7" selection-start-line="7" selection-start-column="7" selection-end-line="7" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/improve.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="147">
<caret line="42" selection-start-line="42" selection-end-line="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/decompose.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
<caret line="45" selection-start-line="45" selection-end-line="45" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/components.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="574">
<caret line="236" selection-start-line="236" selection-end-line="236" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1656">
<caret line="126" column="5" selection-start-line="126" selection-start-column="5" selection-end-line="126" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<caret line="28" lean-forward="true" selection-start-line="28" selection-end-line="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/graph.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="203">
<caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/graph.c">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="2" lean-forward="true" selection-start-line="3" selection-start-column="2" selection-end-line="3" selection-end-column="2" />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
cmake_minimum_required(VERSION 3.5)
project(sga C)
set(CMAKE_C_STANDARD 11)
include_directories(.)
add_definitions(-DPACE_2020)
add_executable(sga
graph.c
graph.h
lire.c
lire.h
lists.c
lists.h
main.c
heap.c
heap.h
tree.c tree.h
decompose.c decompose.h
separator.c separator.h
utils.c utils.h
sets.c sets.h main.h components.c components.h improve.c improve.h)
target_link_libraries(sga m)
Copyright (c) 2020 Sephane Grandcolas
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DEBUG=no
ifeq ($(DEBUG),yes)
CFLAGS= -I sga -g -Wall -pedantic -std=c99
else
CFLAGS= -I sga -std=c99 -O3
endif
ifeq ($(PACE),yes)
PACE_FLAG= -DPACE_2020
endif
src=.
all: sga
sga: obj/main.o obj/lists.o obj/lire.o obj/graph.o obj/tree.o obj/separator.o obj/decompose.o obj/heap.o obj/sets.o obj/utils.o obj/components.o obj/improve.o
gcc $(CFLAGS) obj/main.o obj/lists.o obj/lire.o obj/graph.o obj/tree.o obj/separator.o obj/decompose.o obj/heap.o obj/sets.o obj/utils.o obj/components.o obj/improve.o -o sga
obj/improve.o: ${src}/improve.c ${src}/improve.h ${src}/graph.h ${src}/utils.h ${src}/sets.h ${src}/lists.h ${src}/tree.h ${src}/decompose.h ${src}/main.h
gcc $(CFLAGS) -c ${src}/improve.c -o obj/improve.o
obj/components.o: ${src}/components.c ${src}/components.h ${src}/graph.h ${src}/utils.h ${src}/sets.h ${src}/lists.h ${src}/heap.h
gcc $(CFLAGS) -c ${src}/components.c -o obj/components.o
obj/utils.o: ${src}/utils.c ${src}/utils.h
gcc $(CFLAGS) -c ${src}/utils.c -o obj/utils.o
obj/sets.o: ${src}/sets.c ${src}/sets.h
gcc $(CFLAGS) -c ${src}/sets.c -o obj/sets.o
obj/decompose.o: ${src}/decompose.c ${src}/decompose.h ${src}/separator.h ${src}/graph.h ${src}/utils.h ${src}/tree.h ${src}/separator.h ${src}/heap.h ${src}/main.h ${src}/components.h ${src}/improve.h
gcc $(CFLAGS) $(PACE_FLAG) -c ${src}/decompose.c -o obj/decompose.o
obj/separator.o: ${src}/separator.c ${src}/separator.h ${src}/graph.h ${src}/utils.h ${src}/components.h ${src}/main.h ${src}/heap.h
gcc $(CFLAGS) -c ${src}/separator.c -o obj/separator.o
obj/tree.o: ${src}/tree.c ${src}/tree.h ${src}/graph.h ${src}/utils.h ${src}/sets.h ${src}/decompose.h
gcc $(CFLAGS) -c ${src}/tree.c -o obj/tree.o
obj/main.o: ${src}/main.c ${src}/lists.h ${src}/lire.h ${src}/graph.h ${src}/main.h
gcc $(CFLAGS) $(PACE_FLAG) -c ${src}/main.c -o obj/main.o
obj/graph.o: ${src}/graph.c ${src}/graph.h ${src}/lists.h
gcc $(CFLAGS) -c ${src}/graph.c -o obj/graph.o
obj/lists.o: ${src}/lists.c ${src}/lists.h
gcc $(CFLAGS) -c ${src}/lists.c -o obj/lists.o
obj/lire.o: ${src}/lire.c ${src}/lire.h ${src}/lists.h ${src}/graph.h ${src}/main.h
gcc $(CFLAGS) -c ${src}/lire.c -o obj/lire.o
obj/heap.o: ${src}/heap.c ${src}/heap.h
gcc $(CFLAGS) -c ${src}/heap.c -o obj/heap.o
clean:
rm -f sga \
rm -f obj/*.o
treedepth : A program that builds a tree decomposition of a graph.
The approach consists first in decomposing recursively the graph, searching each time a partition A|B|C of the vertices such that there is no edge of G whose extremities are one in A and the other in B. C is the separator.
The resulting decomposition is improved applying pullups and ejections while the height of the decomposition decreases.
Type make to build the program named treedepth. Type ./treedepth -help to print usage information.
For example ./treedepth -file heur_111.gr time 60.
Use make PACE=yes to generate a version of the program corresponding to pace 2020 requirements (no options in line then).
//
// Created by Stephane on 24/03/2020.
//
#include <assert.h>
#include "components.h"
#include "graph.h"
#include "heap.h"
#include "lists.h"
#include "sets.h"
#include "utils.h"
int *iComp = NULL; // for each vertex, the number of its component
int *compSizes;
int *compNbEdges;
int *compFirsts;
int * tableSortVComp;
//int *firstOfComp; // the first vertex of the component, useful when the component size is 1
int sizeCompMax;
int *queue = NULL, *first, *last;
void allocSearchConnectedComponents(Graph g) {
iComp = malloc(g->n*sizeof(int));
compSizes = malloc(g->n*sizeof(int));
compNbEdges = malloc(g->n*sizeof(int));
compFirsts = malloc(g->n*sizeof(int));
tableSortVComp = malloc(g->n*sizeof