@ladybugmem/icebug 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +32 -10
- package/lib/index.js +23 -11
- package/package.json +9 -15
- package/prebuilds/darwin-arm64/icebug.node +0 -0
- package/{vendor/lib → prebuilds/darwin-arm64}/libnetworkit.dylib +0 -0
- package/prebuilds/linux-x64/icebug.node +0 -0
- package/prebuilds/linux-x64/libnetworkit.so +0 -0
- package/scripts/download-icebug.sh +92 -0
- package/build/Release/.deps/Release/icebug.node.d +0 -1
- package/build/Release/.deps/Release/obj.target/icebug/src/addon.o.d +0 -291
- package/build/Release/icebug.node +0 -0
- package/build/Release/obj.target/icebug/src/addon.o +0 -0
- package/vendor/include/networkit/GlobalState.hpp +0 -86
- package/vendor/include/networkit/Globals.hpp +0 -41
- package/vendor/include/networkit/algebraic/AlgebraicGlobals.hpp +0 -27
- package/vendor/include/networkit/algebraic/CSRGeneralMatrix.hpp +0 -1292
- package/vendor/include/networkit/algebraic/CSRMatrix.hpp +0 -11
- package/vendor/include/networkit/algebraic/DenseMatrix.hpp +0 -537
- package/vendor/include/networkit/algebraic/DynamicMatrix.hpp +0 -514
- package/vendor/include/networkit/algebraic/GraphBLAS.hpp +0 -323
- package/vendor/include/networkit/algebraic/MatrixTools.hpp +0 -156
- package/vendor/include/networkit/algebraic/Semirings.hpp +0 -171
- package/vendor/include/networkit/algebraic/SparseAccumulator.hpp +0 -111
- package/vendor/include/networkit/algebraic/Vector.hpp +0 -371
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicBFS.hpp +0 -72
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicBellmanFord.hpp +0 -88
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicMatchingCoarsening.hpp +0 -96
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicPageRank.hpp +0 -145
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicSpanningEdgeCentrality.hpp +0 -122
- package/vendor/include/networkit/algebraic/algorithms/AlgebraicTriangleCounting.hpp +0 -76
- package/vendor/include/networkit/auxiliary/AlignedAllocator.hpp +0 -113
- package/vendor/include/networkit/auxiliary/ArrayTools.hpp +0 -85
- package/vendor/include/networkit/auxiliary/BloomFilter.hpp +0 -70
- package/vendor/include/networkit/auxiliary/BucketPQ.hpp +0 -142
- package/vendor/include/networkit/auxiliary/Enforce.hpp +0 -117
- package/vendor/include/networkit/auxiliary/FunctionTraits.hpp +0 -74
- package/vendor/include/networkit/auxiliary/HashUtils.hpp +0 -28
- package/vendor/include/networkit/auxiliary/IncrementalUniformRandomSelector.hpp +0 -52
- package/vendor/include/networkit/auxiliary/Log.hpp +0 -119
- package/vendor/include/networkit/auxiliary/MissingMath.hpp +0 -48
- package/vendor/include/networkit/auxiliary/Multiprecision.hpp +0 -17
- package/vendor/include/networkit/auxiliary/NumberParsing.hpp +0 -307
- package/vendor/include/networkit/auxiliary/NumericTools.hpp +0 -57
- package/vendor/include/networkit/auxiliary/Parallel.hpp +0 -56
- package/vendor/include/networkit/auxiliary/Parallelism.hpp +0 -33
- package/vendor/include/networkit/auxiliary/PrioQueue.hpp +0 -252
- package/vendor/include/networkit/auxiliary/Random.hpp +0 -122
- package/vendor/include/networkit/auxiliary/SetIntersector.hpp +0 -72
- package/vendor/include/networkit/auxiliary/SignalHandling.hpp +0 -39
- package/vendor/include/networkit/auxiliary/SortedList.hpp +0 -128
- package/vendor/include/networkit/auxiliary/SparseVector.hpp +0 -215
- package/vendor/include/networkit/auxiliary/SpinLock.hpp +0 -23
- package/vendor/include/networkit/auxiliary/StringBuilder.hpp +0 -322
- package/vendor/include/networkit/auxiliary/StringTools.hpp +0 -76
- package/vendor/include/networkit/auxiliary/TemplateUtils.hpp +0 -76
- package/vendor/include/networkit/auxiliary/Timer.hpp +0 -145
- package/vendor/include/networkit/auxiliary/VectorComparator.hpp +0 -32
- package/vendor/include/networkit/base/Algorithm.hpp +0 -41
- package/vendor/include/networkit/base/DynAlgorithm.hpp +0 -31
- package/vendor/include/networkit/centrality/ApproxBetweenness.hpp +0 -62
- package/vendor/include/networkit/centrality/ApproxCloseness.hpp +0 -136
- package/vendor/include/networkit/centrality/ApproxElectricalCloseness.hpp +0 -156
- package/vendor/include/networkit/centrality/ApproxGroupBetweenness.hpp +0 -124
- package/vendor/include/networkit/centrality/ApproxSpanningEdge.hpp +0 -84
- package/vendor/include/networkit/centrality/Betweenness.hpp +0 -47
- package/vendor/include/networkit/centrality/Centrality.hpp +0 -98
- package/vendor/include/networkit/centrality/Closeness.hpp +0 -107
- package/vendor/include/networkit/centrality/ComplexPaths.hpp +0 -113
- package/vendor/include/networkit/centrality/CoreDecomposition.hpp +0 -161
- package/vendor/include/networkit/centrality/DegreeCentrality.hpp +0 -55
- package/vendor/include/networkit/centrality/DynApproxBetweenness.hpp +0 -95
- package/vendor/include/networkit/centrality/DynBetweenness.hpp +0 -99
- package/vendor/include/networkit/centrality/DynBetweennessOneNode.hpp +0 -98
- package/vendor/include/networkit/centrality/DynKatzCentrality.hpp +0 -115
- package/vendor/include/networkit/centrality/DynTopHarmonicCloseness.hpp +0 -223
- package/vendor/include/networkit/centrality/EigenvectorCentrality.hpp +0 -41
- package/vendor/include/networkit/centrality/EstimateBetweenness.hpp +0 -51
- package/vendor/include/networkit/centrality/ForestCentrality.hpp +0 -112
- package/vendor/include/networkit/centrality/GedWalk.hpp +0 -225
- package/vendor/include/networkit/centrality/GroupCloseness.hpp +0 -115
- package/vendor/include/networkit/centrality/GroupClosenessGrowShrink.hpp +0 -78
- package/vendor/include/networkit/centrality/GroupClosenessLocalSearch.hpp +0 -77
- package/vendor/include/networkit/centrality/GroupClosenessLocalSwaps.hpp +0 -106
- package/vendor/include/networkit/centrality/GroupDegree.hpp +0 -155
- package/vendor/include/networkit/centrality/GroupHarmonicCloseness.hpp +0 -83
- package/vendor/include/networkit/centrality/HarmonicCloseness.hpp +0 -48
- package/vendor/include/networkit/centrality/KPathCentrality.hpp +0 -52
- package/vendor/include/networkit/centrality/KadabraBetweenness.hpp +0 -242
- package/vendor/include/networkit/centrality/KatzCentrality.hpp +0 -62
- package/vendor/include/networkit/centrality/LaplacianCentrality.hpp +0 -44
- package/vendor/include/networkit/centrality/LocalClusteringCoefficient.hpp +0 -60
- package/vendor/include/networkit/centrality/LocalPartitionCoverage.hpp +0 -43
- package/vendor/include/networkit/centrality/LocalSquareClusteringCoefficient.hpp +0 -42
- package/vendor/include/networkit/centrality/PageRank.hpp +0 -101
- package/vendor/include/networkit/centrality/PermanenceCentrality.hpp +0 -48
- package/vendor/include/networkit/centrality/Sfigality.hpp +0 -45
- package/vendor/include/networkit/centrality/SpanningEdgeCentrality.hpp +0 -86
- package/vendor/include/networkit/centrality/TopCloseness.hpp +0 -136
- package/vendor/include/networkit/centrality/TopHarmonicCloseness.hpp +0 -151
- package/vendor/include/networkit/clique/MaximalCliques.hpp +0 -83
- package/vendor/include/networkit/coarsening/ClusteringProjector.hpp +0 -59
- package/vendor/include/networkit/coarsening/CoarsenedGraphView.hpp +0 -156
- package/vendor/include/networkit/coarsening/GraphCoarsening.hpp +0 -57
- package/vendor/include/networkit/coarsening/MatchingCoarsening.hpp +0 -43
- package/vendor/include/networkit/coarsening/ParallelPartitionCoarsening.hpp +0 -33
- package/vendor/include/networkit/coarsening/ParallelPartitionCoarseningView.hpp +0 -62
- package/vendor/include/networkit/community/AdjustedRandMeasure.hpp +0 -31
- package/vendor/include/networkit/community/ClusteringGenerator.hpp +0 -75
- package/vendor/include/networkit/community/CommunityDetectionAlgorithm.hpp +0 -58
- package/vendor/include/networkit/community/Conductance.hpp +0 -32
- package/vendor/include/networkit/community/CoverF1Similarity.hpp +0 -53
- package/vendor/include/networkit/community/CoverHubDominance.hpp +0 -38
- package/vendor/include/networkit/community/Coverage.hpp +0 -25
- package/vendor/include/networkit/community/CutClustering.hpp +0 -62
- package/vendor/include/networkit/community/DissimilarityMeasure.hpp +0 -31
- package/vendor/include/networkit/community/DynamicNMIDistance.hpp +0 -44
- package/vendor/include/networkit/community/EdgeCut.hpp +0 -24
- package/vendor/include/networkit/community/GraphClusteringTools.hpp +0 -103
- package/vendor/include/networkit/community/GraphStructuralRandMeasure.hpp +0 -28
- package/vendor/include/networkit/community/HubDominance.hpp +0 -46
- package/vendor/include/networkit/community/IntrapartitionDensity.hpp +0 -44
- package/vendor/include/networkit/community/IsolatedInterpartitionConductance.hpp +0 -40
- package/vendor/include/networkit/community/IsolatedInterpartitionExpansion.hpp +0 -40
- package/vendor/include/networkit/community/JaccardMeasure.hpp +0 -25
- package/vendor/include/networkit/community/LFM.hpp +0 -49
- package/vendor/include/networkit/community/LPDegreeOrdered.hpp +0 -48
- package/vendor/include/networkit/community/LocalCommunityEvaluation.hpp +0 -100
- package/vendor/include/networkit/community/LocalCoverEvaluation.hpp +0 -31
- package/vendor/include/networkit/community/LocalPartitionEvaluation.hpp +0 -31
- package/vendor/include/networkit/community/LouvainMapEquation.hpp +0 -135
- package/vendor/include/networkit/community/Modularity.hpp +0 -54
- package/vendor/include/networkit/community/NMIDistance.hpp +0 -28
- package/vendor/include/networkit/community/NodeStructuralRandMeasure.hpp +0 -27
- package/vendor/include/networkit/community/OverlappingCommunityDetectionAlgorithm.hpp +0 -51
- package/vendor/include/networkit/community/OverlappingNMIDistance.hpp +0 -175
- package/vendor/include/networkit/community/PLM.hpp +0 -89
- package/vendor/include/networkit/community/PLP.hpp +0 -83
- package/vendor/include/networkit/community/ParallelAgglomerativeClusterer.hpp +0 -37
- package/vendor/include/networkit/community/ParallelLeiden.hpp +0 -96
- package/vendor/include/networkit/community/ParallelLeidenView.hpp +0 -138
- package/vendor/include/networkit/community/PartitionFragmentation.hpp +0 -30
- package/vendor/include/networkit/community/PartitionHubDominance.hpp +0 -37
- package/vendor/include/networkit/community/PartitionIntersection.hpp +0 -25
- package/vendor/include/networkit/community/QualityMeasure.hpp +0 -27
- package/vendor/include/networkit/community/SampledGraphStructuralRandMeasure.hpp +0 -40
- package/vendor/include/networkit/community/SampledNodeStructuralRandMeasure.hpp +0 -40
- package/vendor/include/networkit/community/StablePartitionNodes.hpp +0 -48
- package/vendor/include/networkit/components/BiconnectedComponents.hpp +0 -116
- package/vendor/include/networkit/components/ComponentDecomposition.hpp +0 -72
- package/vendor/include/networkit/components/ConnectedComponents.hpp +0 -55
- package/vendor/include/networkit/components/DynConnectedComponents.hpp +0 -71
- package/vendor/include/networkit/components/DynWeaklyConnectedComponents.hpp +0 -73
- package/vendor/include/networkit/components/ParallelConnectedComponents.hpp +0 -44
- package/vendor/include/networkit/components/RandomSpanningForest.hpp +0 -36
- package/vendor/include/networkit/components/StronglyConnectedComponents.hpp +0 -50
- package/vendor/include/networkit/components/WeaklyConnectedComponents.hpp +0 -59
- package/vendor/include/networkit/correlation/Assortativity.hpp +0 -64
- package/vendor/include/networkit/distance/APSP.hpp +0 -70
- package/vendor/include/networkit/distance/AStar.hpp +0 -68
- package/vendor/include/networkit/distance/AStarGeneral.hpp +0 -110
- package/vendor/include/networkit/distance/AdamicAdarDistance.hpp +0 -52
- package/vendor/include/networkit/distance/AffectedNodes.hpp +0 -130
- package/vendor/include/networkit/distance/AlgebraicDistance.hpp +0 -63
- package/vendor/include/networkit/distance/BFS.hpp +0 -43
- package/vendor/include/networkit/distance/BidirectionalBFS.hpp +0 -51
- package/vendor/include/networkit/distance/BidirectionalDijkstra.hpp +0 -69
- package/vendor/include/networkit/distance/CommuteTimeDistance.hpp +0 -89
- package/vendor/include/networkit/distance/Diameter.hpp +0 -97
- package/vendor/include/networkit/distance/Dijkstra.hpp +0 -50
- package/vendor/include/networkit/distance/DynAPSP.hpp +0 -67
- package/vendor/include/networkit/distance/DynBFS.hpp +0 -56
- package/vendor/include/networkit/distance/DynDijkstra.hpp +0 -57
- package/vendor/include/networkit/distance/DynPrunedLandmarkLabeling.hpp +0 -67
- package/vendor/include/networkit/distance/DynSSSP.hpp +0 -87
- package/vendor/include/networkit/distance/Eccentricity.hpp +0 -32
- package/vendor/include/networkit/distance/EffectiveDiameter.hpp +0 -47
- package/vendor/include/networkit/distance/EffectiveDiameterApproximation.hpp +0 -57
- package/vendor/include/networkit/distance/FloydWarshall.hpp +0 -93
- package/vendor/include/networkit/distance/GraphDistance.hpp +0 -49
- package/vendor/include/networkit/distance/HopPlotApproximation.hpp +0 -62
- package/vendor/include/networkit/distance/IncompleteDijkstra.hpp +0 -66
- package/vendor/include/networkit/distance/IncompleteSSSP.hpp +0 -41
- package/vendor/include/networkit/distance/JaccardDistance.hpp +0 -57
- package/vendor/include/networkit/distance/MultiTargetBFS.hpp +0 -32
- package/vendor/include/networkit/distance/MultiTargetDijkstra.hpp +0 -40
- package/vendor/include/networkit/distance/NeighborhoodFunction.hpp +0 -47
- package/vendor/include/networkit/distance/NeighborhoodFunctionApproximation.hpp +0 -56
- package/vendor/include/networkit/distance/NeighborhoodFunctionHeuristic.hpp +0 -56
- package/vendor/include/networkit/distance/NodeDistance.hpp +0 -54
- package/vendor/include/networkit/distance/PrunedLandmarkLabeling.hpp +0 -76
- package/vendor/include/networkit/distance/ReverseBFS.hpp +0 -46
- package/vendor/include/networkit/distance/SPSP.hpp +0 -143
- package/vendor/include/networkit/distance/SSSP.hpp +0 -216
- package/vendor/include/networkit/distance/STSP.hpp +0 -193
- package/vendor/include/networkit/distance/Volume.hpp +0 -66
- package/vendor/include/networkit/dynamics/DGSStreamParser.hpp +0 -40
- package/vendor/include/networkit/dynamics/DGSWriter.hpp +0 -30
- package/vendor/include/networkit/dynamics/GraphDifference.hpp +0 -110
- package/vendor/include/networkit/dynamics/GraphEvent.hpp +0 -55
- package/vendor/include/networkit/dynamics/GraphEventHandler.hpp +0 -39
- package/vendor/include/networkit/dynamics/GraphEventProxy.hpp +0 -55
- package/vendor/include/networkit/dynamics/GraphUpdater.hpp +0 -38
- package/vendor/include/networkit/edgescores/ChibaNishizekiQuadrangleEdgeScore.hpp +0 -26
- package/vendor/include/networkit/edgescores/ChibaNishizekiTriangleEdgeScore.hpp +0 -33
- package/vendor/include/networkit/edgescores/EdgeScore.hpp +0 -50
- package/vendor/include/networkit/edgescores/EdgeScoreAsWeight.hpp +0 -33
- package/vendor/include/networkit/edgescores/EdgeScoreBlender.hpp +0 -33
- package/vendor/include/networkit/edgescores/EdgeScoreLinearizer.hpp +0 -32
- package/vendor/include/networkit/edgescores/EdgeScoreNormalizer.hpp +0 -35
- package/vendor/include/networkit/edgescores/GeometricMeanScore.hpp +0 -29
- package/vendor/include/networkit/edgescores/PrefixJaccardScore.hpp +0 -23
- package/vendor/include/networkit/edgescores/TriangleEdgeScore.hpp +0 -39
- package/vendor/include/networkit/embedding/Node2Vec.hpp +0 -83
- package/vendor/include/networkit/flow/EdmondsKarp.hpp +0 -112
- package/vendor/include/networkit/generators/BarabasiAlbertGenerator.hpp +0 -87
- package/vendor/include/networkit/generators/ChungLuGenerator.hpp +0 -46
- package/vendor/include/networkit/generators/ChungLuGeneratorAlamEtAl.hpp +0 -63
- package/vendor/include/networkit/generators/ClusteredRandomGraphGenerator.hpp +0 -56
- package/vendor/include/networkit/generators/ConfigurationModel.hpp +0 -36
- package/vendor/include/networkit/generators/DorogovtsevMendesGenerator.hpp +0 -33
- package/vendor/include/networkit/generators/DynamicBarabasiAlbertGenerator.hpp +0 -33
- package/vendor/include/networkit/generators/DynamicDGSParser.hpp +0 -51
- package/vendor/include/networkit/generators/DynamicDorogovtsevMendesGenerator.hpp +0 -34
- package/vendor/include/networkit/generators/DynamicForestFireGenerator.hpp +0 -55
- package/vendor/include/networkit/generators/DynamicGraphGenerator.hpp +0 -40
- package/vendor/include/networkit/generators/DynamicGraphSource.hpp +0 -79
- package/vendor/include/networkit/generators/DynamicHyperbolicGenerator.hpp +0 -143
- package/vendor/include/networkit/generators/DynamicPathGenerator.hpp +0 -26
- package/vendor/include/networkit/generators/DynamicPubWebGenerator.hpp +0 -54
- package/vendor/include/networkit/generators/EdgeSwitchingMarkovChainGenerator.hpp +0 -65
- package/vendor/include/networkit/generators/ErdosRenyiEnumerator.hpp +0 -318
- package/vendor/include/networkit/generators/ErdosRenyiGenerator.hpp +0 -56
- package/vendor/include/networkit/generators/HavelHakimiGenerator.hpp +0 -48
- package/vendor/include/networkit/generators/HyperbolicGenerator.hpp +0 -236
- package/vendor/include/networkit/generators/LFRGenerator.hpp +0 -175
- package/vendor/include/networkit/generators/MocnikGenerator.hpp +0 -147
- package/vendor/include/networkit/generators/MocnikGeneratorBasic.hpp +0 -58
- package/vendor/include/networkit/generators/PowerlawDegreeSequence.hpp +0 -128
- package/vendor/include/networkit/generators/PubWebGenerator.hpp +0 -94
- package/vendor/include/networkit/generators/RegularRingLatticeGenerator.hpp +0 -37
- package/vendor/include/networkit/generators/RmatGenerator.hpp +0 -67
- package/vendor/include/networkit/generators/StaticDegreeSequenceGenerator.hpp +0 -42
- package/vendor/include/networkit/generators/StaticGraphGenerator.hpp +0 -30
- package/vendor/include/networkit/generators/StochasticBlockmodel.hpp +0 -41
- package/vendor/include/networkit/generators/WattsStrogatzGenerator.hpp +0 -43
- package/vendor/include/networkit/generators/quadtree/QuadNode.hpp +0 -857
- package/vendor/include/networkit/generators/quadtree/QuadNodeCartesianEuclid.hpp +0 -587
- package/vendor/include/networkit/generators/quadtree/QuadNodePolarEuclid.hpp +0 -726
- package/vendor/include/networkit/generators/quadtree/Quadtree.hpp +0 -232
- package/vendor/include/networkit/generators/quadtree/QuadtreeCartesianEuclid.hpp +0 -149
- package/vendor/include/networkit/generators/quadtree/QuadtreePolarEuclid.hpp +0 -143
- package/vendor/include/networkit/geometric/HyperbolicSpace.hpp +0 -248
- package/vendor/include/networkit/geometric/Point2DWithIndex.hpp +0 -145
- package/vendor/include/networkit/global/ClusteringCoefficient.hpp +0 -42
- package/vendor/include/networkit/global/GlobalClusteringCoefficient.hpp +0 -24
- package/vendor/include/networkit/graph/Attributes.hpp +0 -568
- package/vendor/include/networkit/graph/BFS.hpp +0 -111
- package/vendor/include/networkit/graph/DFS.hpp +0 -71
- package/vendor/include/networkit/graph/Dijkstra.hpp +0 -83
- package/vendor/include/networkit/graph/EdgeIterators.hpp +0 -171
- package/vendor/include/networkit/graph/Graph.hpp +0 -2083
- package/vendor/include/networkit/graph/GraphBuilder.hpp +0 -289
- package/vendor/include/networkit/graph/GraphR.hpp +0 -133
- package/vendor/include/networkit/graph/GraphTools.hpp +0 -589
- package/vendor/include/networkit/graph/GraphW.hpp +0 -1236
- package/vendor/include/networkit/graph/KruskalMSF.hpp +0 -50
- package/vendor/include/networkit/graph/NeighborIterators.hpp +0 -163
- package/vendor/include/networkit/graph/NodeIterators.hpp +0 -127
- package/vendor/include/networkit/graph/PrimMSF.hpp +0 -66
- package/vendor/include/networkit/graph/RandomMaximumSpanningForest.hpp +0 -133
- package/vendor/include/networkit/graph/SpanningForest.hpp +0 -41
- package/vendor/include/networkit/graph/TopologicalSort.hpp +0 -87
- package/vendor/include/networkit/graph/UnionMaximumSpanningForest.hpp +0 -126
- package/vendor/include/networkit/graph/test/GraphBuilderBenchmark.hpp +0 -68
- package/vendor/include/networkit/independentset/IndependentSetFinder.hpp +0 -44
- package/vendor/include/networkit/independentset/Luby.hpp +0 -27
- package/vendor/include/networkit/io/BinaryEdgeListPartitionReader.hpp +0 -45
- package/vendor/include/networkit/io/BinaryEdgeListPartitionWriter.hpp +0 -47
- package/vendor/include/networkit/io/BinaryPartitionReader.hpp +0 -41
- package/vendor/include/networkit/io/BinaryPartitionWriter.hpp +0 -44
- package/vendor/include/networkit/io/CoverReader.hpp +0 -27
- package/vendor/include/networkit/io/CoverWriter.hpp +0 -21
- package/vendor/include/networkit/io/DGSReader.hpp +0 -39
- package/vendor/include/networkit/io/DibapGraphReader.hpp +0 -43
- package/vendor/include/networkit/io/DotGraphWriter.hpp +0 -39
- package/vendor/include/networkit/io/DotPartitionWriter.hpp +0 -23
- package/vendor/include/networkit/io/DynamicGraphReader.hpp +0 -29
- package/vendor/include/networkit/io/EdgeListCoverReader.hpp +0 -35
- package/vendor/include/networkit/io/EdgeListPartitionReader.hpp +0 -43
- package/vendor/include/networkit/io/EdgeListReader.hpp +0 -61
- package/vendor/include/networkit/io/EdgeListWriter.hpp +0 -48
- package/vendor/include/networkit/io/GMLGraphReader.hpp +0 -33
- package/vendor/include/networkit/io/GMLGraphWriter.hpp +0 -33
- package/vendor/include/networkit/io/GraphIO.hpp +0 -52
- package/vendor/include/networkit/io/GraphReader.hpp +0 -40
- package/vendor/include/networkit/io/GraphToolBinaryReader.hpp +0 -71
- package/vendor/include/networkit/io/GraphToolBinaryWriter.hpp +0 -61
- package/vendor/include/networkit/io/GraphWriter.hpp +0 -27
- package/vendor/include/networkit/io/KONECTGraphReader.hpp +0 -44
- package/vendor/include/networkit/io/LineFileReader.hpp +0 -42
- package/vendor/include/networkit/io/METISGraphReader.hpp +0 -36
- package/vendor/include/networkit/io/METISGraphWriter.hpp +0 -29
- package/vendor/include/networkit/io/METISParser.hpp +0 -63
- package/vendor/include/networkit/io/MTXGraphReader.hpp +0 -31
- package/vendor/include/networkit/io/MTXParser.hpp +0 -87
- package/vendor/include/networkit/io/MatrixMarketReader.hpp +0 -33
- package/vendor/include/networkit/io/MatrixReader.hpp +0 -33
- package/vendor/include/networkit/io/MemoryMappedFile.hpp +0 -80
- package/vendor/include/networkit/io/NetworkitBinaryGraph.hpp +0 -144
- package/vendor/include/networkit/io/NetworkitBinaryReader.hpp +0 -50
- package/vendor/include/networkit/io/NetworkitBinaryWriter.hpp +0 -71
- package/vendor/include/networkit/io/PartitionReader.hpp +0 -34
- package/vendor/include/networkit/io/PartitionWriter.hpp +0 -31
- package/vendor/include/networkit/io/RBGraphReader.hpp +0 -37
- package/vendor/include/networkit/io/RBMatrixReader.hpp +0 -49
- package/vendor/include/networkit/io/RasterReader.hpp +0 -40
- package/vendor/include/networkit/io/SNAPEdgeListPartitionReader.hpp +0 -28
- package/vendor/include/networkit/io/SNAPGraphReader.hpp +0 -53
- package/vendor/include/networkit/io/SNAPGraphWriter.hpp +0 -53
- package/vendor/include/networkit/io/ThrillGraphBinaryReader.hpp +0 -44
- package/vendor/include/networkit/io/ThrillGraphBinaryWriter.hpp +0 -27
- package/vendor/include/networkit/layout/LayoutAlgorithm.hpp +0 -39
- package/vendor/include/networkit/linkprediction/AdamicAdarIndex.hpp +0 -37
- package/vendor/include/networkit/linkprediction/AdjustedRandIndex.hpp +0 -36
- package/vendor/include/networkit/linkprediction/AlgebraicDistanceIndex.hpp +0 -70
- package/vendor/include/networkit/linkprediction/CommonNeighborsIndex.hpp +0 -39
- package/vendor/include/networkit/linkprediction/EvaluationMetric.hpp +0 -135
- package/vendor/include/networkit/linkprediction/JaccardIndex.hpp +0 -44
- package/vendor/include/networkit/linkprediction/KatzIndex.hpp +0 -84
- package/vendor/include/networkit/linkprediction/LinkPredictor.hpp +0 -98
- package/vendor/include/networkit/linkprediction/LinkThresholder.hpp +0 -56
- package/vendor/include/networkit/linkprediction/MissingLinksFinder.hpp +0 -60
- package/vendor/include/networkit/linkprediction/NeighborhoodDistanceIndex.hpp +0 -42
- package/vendor/include/networkit/linkprediction/NeighborhoodUtility.hpp +0 -54
- package/vendor/include/networkit/linkprediction/NeighborsMeasureIndex.hpp +0 -48
- package/vendor/include/networkit/linkprediction/PrecisionRecallMetric.hpp +0 -40
- package/vendor/include/networkit/linkprediction/PredictionsSorter.hpp +0 -66
- package/vendor/include/networkit/linkprediction/PreferentialAttachmentIndex.hpp +0 -37
- package/vendor/include/networkit/linkprediction/ROCMetric.hpp +0 -39
- package/vendor/include/networkit/linkprediction/RandomLinkSampler.hpp +0 -47
- package/vendor/include/networkit/linkprediction/ResourceAllocationIndex.hpp +0 -38
- package/vendor/include/networkit/linkprediction/SameCommunityIndex.hpp +0 -50
- package/vendor/include/networkit/linkprediction/TotalNeighborsIndex.hpp +0 -39
- package/vendor/include/networkit/linkprediction/UDegreeIndex.hpp +0 -35
- package/vendor/include/networkit/linkprediction/VDegreeIndex.hpp +0 -35
- package/vendor/include/networkit/matching/BMatcher.hpp +0 -52
- package/vendor/include/networkit/matching/BMatching.hpp +0 -115
- package/vendor/include/networkit/matching/BSuitorMatcher.hpp +0 -170
- package/vendor/include/networkit/matching/DynamicBSuitorMatcher.hpp +0 -78
- package/vendor/include/networkit/matching/LocalMaxMatcher.hpp +0 -35
- package/vendor/include/networkit/matching/Matcher.hpp +0 -55
- package/vendor/include/networkit/matching/Matching.hpp +0 -111
- package/vendor/include/networkit/matching/PathGrowingMatcher.hpp +0 -46
- package/vendor/include/networkit/matching/SuitorMatcher.hpp +0 -62
- package/vendor/include/networkit/numerics/ConjugateGradient.hpp +0 -163
- package/vendor/include/networkit/numerics/GaussSeidelRelaxation.hpp +0 -99
- package/vendor/include/networkit/numerics/LAMG/LAMGSettings.hpp +0 -70
- package/vendor/include/networkit/numerics/LAMG/Lamg.hpp +0 -460
- package/vendor/include/networkit/numerics/LAMG/Level/EliminationStage.hpp +0 -47
- package/vendor/include/networkit/numerics/LAMG/Level/Level.hpp +0 -56
- package/vendor/include/networkit/numerics/LAMG/Level/LevelAggregation.hpp +0 -52
- package/vendor/include/networkit/numerics/LAMG/Level/LevelElimination.hpp +0 -133
- package/vendor/include/networkit/numerics/LAMG/Level/LevelFinest.hpp +0 -28
- package/vendor/include/networkit/numerics/LAMG/LevelHierarchy.hpp +0 -165
- package/vendor/include/networkit/numerics/LAMG/MultiLevelSetup.hpp +0 -1090
- package/vendor/include/networkit/numerics/LAMG/SolverLamg.hpp +0 -316
- package/vendor/include/networkit/numerics/LinearSolver.hpp +0 -151
- package/vendor/include/networkit/numerics/Preconditioner/DiagonalPreconditioner.hpp +0 -61
- package/vendor/include/networkit/numerics/Preconditioner/IdentityPreconditioner.hpp +0 -36
- package/vendor/include/networkit/numerics/Smoother.hpp +0 -37
- package/vendor/include/networkit/overlap/HashingOverlapper.hpp +0 -28
- package/vendor/include/networkit/overlap/Overlapper.hpp +0 -27
- package/vendor/include/networkit/planarity/LeftRightPlanarityCheck.hpp +0 -113
- package/vendor/include/networkit/randomization/Curveball.hpp +0 -49
- package/vendor/include/networkit/randomization/CurveballGlobalTradeGenerator.hpp +0 -39
- package/vendor/include/networkit/randomization/CurveballUniformTradeGenerator.hpp +0 -39
- package/vendor/include/networkit/randomization/DegreePreservingShuffle.hpp +0 -82
- package/vendor/include/networkit/randomization/EdgeSwitching.hpp +0 -157
- package/vendor/include/networkit/randomization/GlobalCurveball.hpp +0 -69
- package/vendor/include/networkit/randomization/GlobalTradeSequence.hpp +0 -303
- package/vendor/include/networkit/reachability/AllSimplePaths.hpp +0 -122
- package/vendor/include/networkit/reachability/ReachableNodes.hpp +0 -83
- package/vendor/include/networkit/scd/ApproximatePageRank.hpp +0 -51
- package/vendor/include/networkit/scd/CliqueDetect.hpp +0 -55
- package/vendor/include/networkit/scd/CombinedSCD.hpp +0 -51
- package/vendor/include/networkit/scd/GCE.hpp +0 -42
- package/vendor/include/networkit/scd/LFMLocal.hpp +0 -54
- package/vendor/include/networkit/scd/LocalT.hpp +0 -40
- package/vendor/include/networkit/scd/LocalTightnessExpansion.hpp +0 -46
- package/vendor/include/networkit/scd/PageRankNibble.hpp +0 -55
- package/vendor/include/networkit/scd/RandomBFS.hpp +0 -33
- package/vendor/include/networkit/scd/SCDGroundTruthComparison.hpp +0 -121
- package/vendor/include/networkit/scd/SelectiveCommunityDetector.hpp +0 -76
- package/vendor/include/networkit/scd/SetConductance.hpp +0 -47
- package/vendor/include/networkit/scd/TCE.hpp +0 -41
- package/vendor/include/networkit/scd/TwoPhaseL.hpp +0 -40
- package/vendor/include/networkit/scoring/EdgeScoring.hpp +0 -44
- package/vendor/include/networkit/scoring/ModularityScoring.hpp +0 -79
- package/vendor/include/networkit/simulation/EpidemicSimulationSEIR.hpp +0 -59
- package/vendor/include/networkit/sparsification/ChanceCorrectedTriangleScore.hpp +0 -28
- package/vendor/include/networkit/sparsification/ForestFireScore.hpp +0 -34
- package/vendor/include/networkit/sparsification/GlobalThresholdFilter.hpp +0 -40
- package/vendor/include/networkit/sparsification/LocalDegreeScore.hpp +0 -30
- package/vendor/include/networkit/sparsification/LocalFilterScore.hpp +0 -124
- package/vendor/include/networkit/sparsification/LocalSimilarityScore.hpp +0 -63
- package/vendor/include/networkit/sparsification/MultiscaleScore.hpp +0 -38
- package/vendor/include/networkit/sparsification/RandomEdgeScore.hpp +0 -33
- package/vendor/include/networkit/sparsification/RandomNodeEdgeScore.hpp +0 -29
- package/vendor/include/networkit/sparsification/SCANStructuralSimilarityScore.hpp +0 -23
- package/vendor/include/networkit/sparsification/SimmelianOverlapScore.hpp +0 -35
- package/vendor/include/networkit/sparsification/SimmelianScore.hpp +0 -92
- package/vendor/include/networkit/sparsification/Sparsifiers.hpp +0 -166
- package/vendor/include/networkit/structures/Cover.hpp +0 -248
- package/vendor/include/networkit/structures/LocalCommunity.hpp +0 -363
- package/vendor/include/networkit/structures/Partition.hpp +0 -335
- package/vendor/include/networkit/structures/UnionFind.hpp +0 -66
- package/vendor/include/networkit/viz/GraphLayoutAlgorithm.hpp +0 -157
- package/vendor/include/networkit/viz/MaxentStress.hpp +0 -346
- package/vendor/include/networkit/viz/Octree.hpp +0 -428
- package/vendor/include/networkit/viz/PivotMDS.hpp +0 -63
- package/vendor/include/networkit/viz/Point.hpp +0 -415
- package/vendor/include/networkit/viz/PostscriptWriter.hpp +0 -78
- package/vendor/include/tlx/algorithm/exclusive_scan.hpp +0 -56
- package/vendor/include/tlx/algorithm/is_sorted_cmp.hpp +0 -56
- package/vendor/include/tlx/algorithm/merge_advance.hpp +0 -177
- package/vendor/include/tlx/algorithm/merge_combine.hpp +0 -76
- package/vendor/include/tlx/algorithm/multisequence_partition.hpp +0 -346
- package/vendor/include/tlx/algorithm/multisequence_selection.hpp +0 -351
- package/vendor/include/tlx/algorithm/multiway_merge.hpp +0 -1385
- package/vendor/include/tlx/algorithm/multiway_merge_splitting.hpp +0 -257
- package/vendor/include/tlx/algorithm/parallel_multiway_merge.hpp +0 -408
- package/vendor/include/tlx/algorithm/random_bipartition_shuffle.hpp +0 -116
- package/vendor/include/tlx/algorithm.hpp +0 -36
- package/vendor/include/tlx/allocator_base.hpp +0 -100
- package/vendor/include/tlx/backtrace.hpp +0 -54
- package/vendor/include/tlx/cmdline_parser.hpp +0 -498
- package/vendor/include/tlx/container/btree.hpp +0 -3977
- package/vendor/include/tlx/container/btree_map.hpp +0 -634
- package/vendor/include/tlx/container/btree_multimap.hpp +0 -627
- package/vendor/include/tlx/container/btree_multiset.hpp +0 -612
- package/vendor/include/tlx/container/btree_set.hpp +0 -612
- package/vendor/include/tlx/container/d_ary_addressable_int_heap.hpp +0 -416
- package/vendor/include/tlx/container/d_ary_heap.hpp +0 -311
- package/vendor/include/tlx/container/loser_tree.hpp +0 -1009
- package/vendor/include/tlx/container/lru_cache.hpp +0 -319
- package/vendor/include/tlx/container/radix_heap.hpp +0 -735
- package/vendor/include/tlx/container/ring_buffer.hpp +0 -428
- package/vendor/include/tlx/container/simple_vector.hpp +0 -304
- package/vendor/include/tlx/container/splay_tree.hpp +0 -399
- package/vendor/include/tlx/container/string_view.hpp +0 -805
- package/vendor/include/tlx/container.hpp +0 -40
- package/vendor/include/tlx/counting_ptr.hpp +0 -522
- package/vendor/include/tlx/define/attribute_always_inline.hpp +0 -34
- package/vendor/include/tlx/define/attribute_fallthrough.hpp +0 -36
- package/vendor/include/tlx/define/attribute_format_printf.hpp +0 -34
- package/vendor/include/tlx/define/attribute_packed.hpp +0 -34
- package/vendor/include/tlx/define/attribute_warn_unused_result.hpp +0 -34
- package/vendor/include/tlx/define/constexpr.hpp +0 -31
- package/vendor/include/tlx/define/deprecated.hpp +0 -39
- package/vendor/include/tlx/define/endian.hpp +0 -49
- package/vendor/include/tlx/define/likely.hpp +0 -33
- package/vendor/include/tlx/define/visibility_hidden.hpp +0 -34
- package/vendor/include/tlx/define.hpp +0 -36
- package/vendor/include/tlx/delegate.hpp +0 -524
- package/vendor/include/tlx/die/core.hpp +0 -311
- package/vendor/include/tlx/die.hpp +0 -106
- package/vendor/include/tlx/digest/md5.hpp +0 -81
- package/vendor/include/tlx/digest/sha1.hpp +0 -81
- package/vendor/include/tlx/digest/sha256.hpp +0 -81
- package/vendor/include/tlx/digest/sha512.hpp +0 -81
- package/vendor/include/tlx/digest.hpp +0 -30
- package/vendor/include/tlx/logger/all.hpp +0 -33
- package/vendor/include/tlx/logger/array.hpp +0 -43
- package/vendor/include/tlx/logger/core.hpp +0 -287
- package/vendor/include/tlx/logger/deque.hpp +0 -42
- package/vendor/include/tlx/logger/map.hpp +0 -65
- package/vendor/include/tlx/logger/set.hpp +0 -60
- package/vendor/include/tlx/logger/tuple.hpp +0 -66
- package/vendor/include/tlx/logger/unordered_map.hpp +0 -68
- package/vendor/include/tlx/logger/unordered_set.hpp +0 -64
- package/vendor/include/tlx/logger/wrap_unprintable.hpp +0 -75
- package/vendor/include/tlx/logger.hpp +0 -44
- package/vendor/include/tlx/math/abs_diff.hpp +0 -35
- package/vendor/include/tlx/math/aggregate.hpp +0 -231
- package/vendor/include/tlx/math/aggregate_min_max.hpp +0 -116
- package/vendor/include/tlx/math/bswap.hpp +0 -148
- package/vendor/include/tlx/math/bswap_be.hpp +0 -79
- package/vendor/include/tlx/math/bswap_le.hpp +0 -79
- package/vendor/include/tlx/math/clz.hpp +0 -174
- package/vendor/include/tlx/math/ctz.hpp +0 -174
- package/vendor/include/tlx/math/div_ceil.hpp +0 -36
- package/vendor/include/tlx/math/ffs.hpp +0 -123
- package/vendor/include/tlx/math/integer_log2.hpp +0 -189
- package/vendor/include/tlx/math/is_power_of_two.hpp +0 -74
- package/vendor/include/tlx/math/polynomial_regression.hpp +0 -243
- package/vendor/include/tlx/math/popcount.hpp +0 -173
- package/vendor/include/tlx/math/power_to_the.hpp +0 -44
- package/vendor/include/tlx/math/rol.hpp +0 -112
- package/vendor/include/tlx/math/ror.hpp +0 -112
- package/vendor/include/tlx/math/round_to_power_of_two.hpp +0 -121
- package/vendor/include/tlx/math/round_up.hpp +0 -36
- package/vendor/include/tlx/math/sgn.hpp +0 -38
- package/vendor/include/tlx/math.hpp +0 -46
- package/vendor/include/tlx/meta/apply_tuple.hpp +0 -55
- package/vendor/include/tlx/meta/call_for_range.hpp +0 -78
- package/vendor/include/tlx/meta/call_foreach.hpp +0 -60
- package/vendor/include/tlx/meta/call_foreach_tuple.hpp +0 -60
- package/vendor/include/tlx/meta/call_foreach_tuple_with_index.hpp +0 -61
- package/vendor/include/tlx/meta/call_foreach_with_index.hpp +0 -64
- package/vendor/include/tlx/meta/enable_if.hpp +0 -37
- package/vendor/include/tlx/meta/fold_left.hpp +0 -63
- package/vendor/include/tlx/meta/fold_left_tuple.hpp +0 -60
- package/vendor/include/tlx/meta/fold_right.hpp +0 -63
- package/vendor/include/tlx/meta/fold_right_tuple.hpp +0 -60
- package/vendor/include/tlx/meta/function_chain.hpp +0 -197
- package/vendor/include/tlx/meta/function_stack.hpp +0 -189
- package/vendor/include/tlx/meta/has_member.hpp +0 -80
- package/vendor/include/tlx/meta/has_method.hpp +0 -117
- package/vendor/include/tlx/meta/index_sequence.hpp +0 -66
- package/vendor/include/tlx/meta/is_std_array.hpp +0 -40
- package/vendor/include/tlx/meta/is_std_pair.hpp +0 -39
- package/vendor/include/tlx/meta/is_std_tuple.hpp +0 -39
- package/vendor/include/tlx/meta/is_std_vector.hpp +0 -39
- package/vendor/include/tlx/meta/log2.hpp +0 -101
- package/vendor/include/tlx/meta/no_operation.hpp +0 -55
- package/vendor/include/tlx/meta/static_index.hpp +0 -42
- package/vendor/include/tlx/meta/vexpand.hpp +0 -34
- package/vendor/include/tlx/meta/vmap_for_range.hpp +0 -84
- package/vendor/include/tlx/meta/vmap_foreach.hpp +0 -63
- package/vendor/include/tlx/meta/vmap_foreach_tuple.hpp +0 -59
- package/vendor/include/tlx/meta/vmap_foreach_tuple_with_index.hpp +0 -62
- package/vendor/include/tlx/meta/vmap_foreach_with_index.hpp +0 -70
- package/vendor/include/tlx/meta.hpp +0 -55
- package/vendor/include/tlx/multi_timer.hpp +0 -148
- package/vendor/include/tlx/port/setenv.hpp +0 -31
- package/vendor/include/tlx/port.hpp +0 -27
- package/vendor/include/tlx/semaphore.hpp +0 -119
- package/vendor/include/tlx/simple_vector.hpp +0 -20
- package/vendor/include/tlx/siphash.hpp +0 -282
- package/vendor/include/tlx/sort/networks/best.hpp +0 -611
- package/vendor/include/tlx/sort/networks/bose_nelson.hpp +0 -412
- package/vendor/include/tlx/sort/networks/bose_nelson_parameter.hpp +0 -507
- package/vendor/include/tlx/sort/networks/cswap.hpp +0 -60
- package/vendor/include/tlx/sort/parallel_mergesort.hpp +0 -398
- package/vendor/include/tlx/sort/strings/insertion_sort.hpp +0 -232
- package/vendor/include/tlx/sort/strings/multikey_quicksort.hpp +0 -185
- package/vendor/include/tlx/sort/strings/parallel_sample_sort.hpp +0 -1647
- package/vendor/include/tlx/sort/strings/radix_sort.hpp +0 -934
- package/vendor/include/tlx/sort/strings/sample_sort_tools.hpp +0 -756
- package/vendor/include/tlx/sort/strings/string_ptr.hpp +0 -426
- package/vendor/include/tlx/sort/strings/string_set.hpp +0 -800
- package/vendor/include/tlx/sort/strings.hpp +0 -329
- package/vendor/include/tlx/sort/strings_parallel.hpp +0 -325
- package/vendor/include/tlx/sort.hpp +0 -29
- package/vendor/include/tlx/stack_allocator.hpp +0 -226
- package/vendor/include/tlx/string/appendline.hpp +0 -35
- package/vendor/include/tlx/string/base64.hpp +0 -87
- package/vendor/include/tlx/string/bitdump.hpp +0 -139
- package/vendor/include/tlx/string/compare_icase.hpp +0 -42
- package/vendor/include/tlx/string/contains.hpp +0 -36
- package/vendor/include/tlx/string/contains_word.hpp +0 -42
- package/vendor/include/tlx/string/ends_with.hpp +0 -79
- package/vendor/include/tlx/string/equal_icase.hpp +0 -42
- package/vendor/include/tlx/string/erase_all.hpp +0 -70
- package/vendor/include/tlx/string/escape_html.hpp +0 -34
- package/vendor/include/tlx/string/escape_uri.hpp +0 -34
- package/vendor/include/tlx/string/expand_environment_variables.hpp +0 -49
- package/vendor/include/tlx/string/extract_between.hpp +0 -40
- package/vendor/include/tlx/string/format_iec_units.hpp +0 -32
- package/vendor/include/tlx/string/format_si_iec_units.hpp +0 -19
- package/vendor/include/tlx/string/format_si_units.hpp +0 -32
- package/vendor/include/tlx/string/hash_djb2.hpp +0 -87
- package/vendor/include/tlx/string/hash_sdbm.hpp +0 -86
- package/vendor/include/tlx/string/hexdump.hpp +0 -154
- package/vendor/include/tlx/string/index_of.hpp +0 -56
- package/vendor/include/tlx/string/join.hpp +0 -65
- package/vendor/include/tlx/string/join_generic.hpp +0 -89
- package/vendor/include/tlx/string/join_quoted.hpp +0 -46
- package/vendor/include/tlx/string/less_icase.hpp +0 -64
- package/vendor/include/tlx/string/levenshtein.hpp +0 -193
- package/vendor/include/tlx/string/pad.hpp +0 -39
- package/vendor/include/tlx/string/parse_si_iec_units.hpp +0 -46
- package/vendor/include/tlx/string/parse_uri.hpp +0 -66
- package/vendor/include/tlx/string/parse_uri_form_data.hpp +0 -136
- package/vendor/include/tlx/string/replace.hpp +0 -141
- package/vendor/include/tlx/string/split.hpp +0 -170
- package/vendor/include/tlx/string/split_quoted.hpp +0 -49
- package/vendor/include/tlx/string/split_view.hpp +0 -218
- package/vendor/include/tlx/string/split_words.hpp +0 -53
- package/vendor/include/tlx/string/ssprintf.hpp +0 -45
- package/vendor/include/tlx/string/ssprintf_generic.hpp +0 -95
- package/vendor/include/tlx/string/starts_with.hpp +0 -44
- package/vendor/include/tlx/string/to_lower.hpp +0 -47
- package/vendor/include/tlx/string/to_upper.hpp +0 -47
- package/vendor/include/tlx/string/trim.hpp +0 -298
- package/vendor/include/tlx/string/union_words.hpp +0 -33
- package/vendor/include/tlx/string/word_wrap.hpp +0 -35
- package/vendor/include/tlx/string.hpp +0 -68
- package/vendor/include/tlx/thread_barrier_mutex.hpp +0 -109
- package/vendor/include/tlx/thread_barrier_spin.hpp +0 -127
- package/vendor/include/tlx/thread_pool.hpp +0 -151
- package/vendor/include/tlx/timestamp.hpp +0 -23
- package/vendor/include/tlx/unused.hpp +0 -28
- package/vendor/include/tlx/vector_free.hpp +0 -30
- package/vendor/include/tlx/version.hpp +0 -49
- package/vendor/include/ttmath/ttmath.h +0 -2881
- package/vendor/include/ttmath/ttmathbig.h +0 -6111
- package/vendor/include/ttmath/ttmathdec.h +0 -419
- package/vendor/include/ttmath/ttmathint.h +0 -1923
- package/vendor/include/ttmath/ttmathmisc.h +0 -250
- package/vendor/include/ttmath/ttmathobjects.h +0 -812
- package/vendor/include/ttmath/ttmathparser.h +0 -2791
- package/vendor/include/ttmath/ttmaththreads.h +0 -252
- package/vendor/include/ttmath/ttmathtypes.h +0 -707
- package/vendor/include/ttmath/ttmathuint.h +0 -4190
- package/vendor/include/ttmath/ttmathuint_noasm.h +0 -1038
- package/vendor/include/ttmath/ttmathuint_x86.h +0 -1620
- package/vendor/include/ttmath/ttmathuint_x86_64.h +0 -1177
- package/vendor/lib/cmake/tlx/tlx-config.cmake +0 -51
- package/vendor/lib/cmake/tlx/tlx-targets-release.cmake +0 -19
- package/vendor/lib/cmake/tlx/tlx-targets.cmake +0 -106
- package/vendor/lib/cmake/tlx/tlx-version.cmake +0 -11
- package/vendor/lib/libtlx.a +0 -0
- package/vendor/lib/pkgconfig/networkit.pc +0 -11
- package/vendor/lib/pkgconfig/tlx.pc +0 -11
|
@@ -1,1236 +0,0 @@
|
|
|
1
|
-
#ifndef NETWORKIT_GRAPH_GRAPH_W_HPP_
|
|
2
|
-
#define NETWORKIT_GRAPH_GRAPH_W_HPP_
|
|
3
|
-
|
|
4
|
-
#include <set>
|
|
5
|
-
#include <networkit/graph/Graph.hpp>
|
|
6
|
-
|
|
7
|
-
namespace NetworKit {
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @ingroup graph
|
|
11
|
-
* A writable graph that extends Graph with mutation operations.
|
|
12
|
-
* This class provides all read operations from Graph plus write operations
|
|
13
|
-
* like addNode, addEdge, removeNode, removeEdge, etc.
|
|
14
|
-
*
|
|
15
|
-
* GraphW uses traditional vector-based adjacency lists for mutable operations,
|
|
16
|
-
* while the base Graph class uses memory-efficient Arrow CSR arrays.
|
|
17
|
-
*/
|
|
18
|
-
class GraphW final : public Graph {
|
|
19
|
-
|
|
20
|
-
protected:
|
|
21
|
-
// Vector-based adjacency data structures for mutable operations
|
|
22
|
-
//!< only used for directed graphs, inEdges[v] contains all nodes u that
|
|
23
|
-
//!< have an edge (u, v)
|
|
24
|
-
std::vector<std::vector<node>> inEdges;
|
|
25
|
-
//!< (outgoing) edges, for each edge (u, v) v is saved in outEdges[u] and
|
|
26
|
-
//!< for undirected also u in outEdges[v]
|
|
27
|
-
std::vector<std::vector<node>> outEdges;
|
|
28
|
-
|
|
29
|
-
//!< only used for directed graphs, same schema as inEdges
|
|
30
|
-
std::vector<std::vector<edgeweight>> inEdgeWeights;
|
|
31
|
-
//!< same schema (and same order!) as outEdges
|
|
32
|
-
std::vector<std::vector<edgeweight>> outEdgeWeights;
|
|
33
|
-
|
|
34
|
-
//!< only used for directed graphs, same schema as inEdges
|
|
35
|
-
std::vector<std::vector<edgeid>> inEdgeIds;
|
|
36
|
-
//!< same schema (and same order!) as outEdges
|
|
37
|
-
std::vector<std::vector<edgeid>> outEdgeIds;
|
|
38
|
-
|
|
39
|
-
public:
|
|
40
|
-
/**
|
|
41
|
-
* Check for invalid graph states for vector-based graphs.
|
|
42
|
-
* @return False if the graph is in invalid state.
|
|
43
|
-
*/
|
|
44
|
-
bool checkConsistency() const override;
|
|
45
|
-
|
|
46
|
-
private:
|
|
47
|
-
/**
|
|
48
|
-
* Initialize vector-based data structures based on graph properties
|
|
49
|
-
*/
|
|
50
|
-
void initializeVectorStructures() {
|
|
51
|
-
count nodeCount = upperNodeIdBound();
|
|
52
|
-
|
|
53
|
-
inEdges.resize(isDirected() ? nodeCount : 0);
|
|
54
|
-
outEdges.resize(nodeCount);
|
|
55
|
-
inEdgeWeights.resize(isWeighted() && isDirected() ? nodeCount : 0);
|
|
56
|
-
outEdgeWeights.resize(isWeighted() ? nodeCount : 0);
|
|
57
|
-
inEdgeIds.resize(hasEdgeIds() && isDirected() ? nodeCount : 0);
|
|
58
|
-
outEdgeIds.resize(hasEdgeIds() ? nodeCount : 0);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public:
|
|
62
|
-
/**
|
|
63
|
-
* Create a graph of @a n nodes. The graph has assignable edge weights if @a
|
|
64
|
-
* weighted is set to <code>true</code>. If @a weighted is set to
|
|
65
|
-
* <code>false</code> each edge has edge weight 1.0 and any other weight
|
|
66
|
-
* assignment will be ignored.
|
|
67
|
-
* @param n Number of nodes.
|
|
68
|
-
* @param weighted If set to <code>true</code>, the graph has edge weights.
|
|
69
|
-
* @param directed If set to @c true, the graph will be directed.
|
|
70
|
-
* @param edgesIndexed If set to @c true, the graph will have indexed edges.
|
|
71
|
-
*/
|
|
72
|
-
GraphW(count n = 0, bool weighted = false, bool directed = false, bool edgesIndexed = false)
|
|
73
|
-
: Graph(n, weighted, directed, edgesIndexed), inEdges(directed ? n : 0), outEdges(n),
|
|
74
|
-
inEdgeWeights(weighted && directed ? n : 0), outEdgeWeights(weighted ? n : 0),
|
|
75
|
-
inEdgeIds(edgesIndexed && directed ? n : 0), outEdgeIds(edgesIndexed ? n : 0) {}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Generate a weighted graph from a list of edges. (Useful for small
|
|
79
|
-
* graphs in unit tests that you do not want to read from a file.)
|
|
80
|
-
*
|
|
81
|
-
* @param[in] edges list of weighted edges
|
|
82
|
-
*/
|
|
83
|
-
GraphW(std::initializer_list<WeightedEdge> edges);
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Create a graph as copy of @a other.
|
|
87
|
-
* @param other The graph to copy.
|
|
88
|
-
*/
|
|
89
|
-
GraphW(const GraphW &other)
|
|
90
|
-
: Graph(other, true), inEdges(other.inEdges), outEdges(other.outEdges),
|
|
91
|
-
inEdgeWeights(other.inEdgeWeights), outEdgeWeights(other.outEdgeWeights),
|
|
92
|
-
inEdgeIds(other.inEdgeIds), outEdgeIds(other.outEdgeIds) {
|
|
93
|
-
// GraphW uses vector-based storage, not CSR
|
|
94
|
-
// Clear any CSR pointers that may have been copied from base class
|
|
95
|
-
outEdgesCSRIndices.reset();
|
|
96
|
-
outEdgesCSRIndptr.reset();
|
|
97
|
-
inEdgesCSRIndices.reset();
|
|
98
|
-
inEdgesCSRIndptr.reset();
|
|
99
|
-
outEdgesCSRWeights.reset();
|
|
100
|
-
inEdgesCSRWeights.reset();
|
|
101
|
-
usingCSR = false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Create a graph as copy of @a other.
|
|
106
|
-
* @param other The graph to copy.
|
|
107
|
-
*/
|
|
108
|
-
GraphW(const Graph &other)
|
|
109
|
-
: GraphW(other, other.isWeighted(), other.isDirected(), other.hasEdgeIds()) {}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Create a graph as copy of @a other with modified properties.
|
|
113
|
-
* @param other The graph to copy.
|
|
114
|
-
* @param weighted If set to true, the graph has edge weights.
|
|
115
|
-
* @param directed If set to true, the graph will be directed.
|
|
116
|
-
* @param edgesIndexed If set to true, the graph will have indexed edges.
|
|
117
|
-
*/
|
|
118
|
-
template <class EdgeMerger = std::plus<edgeweight>>
|
|
119
|
-
GraphW(const Graph &other, bool weighted, bool directed, bool edgesIndexed = false,
|
|
120
|
-
EdgeMerger edgeMerger = std::plus<edgeweight>())
|
|
121
|
-
: GraphW(other.upperNodeIdBound(), weighted, directed, edgesIndexed) {
|
|
122
|
-
|
|
123
|
-
// Remove nodes that don't exist in the source graph
|
|
124
|
-
for (node v = 0; v < other.upperNodeIdBound(); ++v) {
|
|
125
|
-
if (!other.hasNode(v)) {
|
|
126
|
-
removeNode(v);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Copy all edges using the public API
|
|
131
|
-
if (other.isDirected() == directed) {
|
|
132
|
-
// Same directedness - straightforward copy
|
|
133
|
-
other.forEdges([&](node u, node v, edgeweight w, [[maybe_unused]] edgeid id) {
|
|
134
|
-
addEdge(u, v, weighted ? w : defaultEdgeWeight);
|
|
135
|
-
});
|
|
136
|
-
} else if (other.isDirected() && !directed) {
|
|
137
|
-
// Converting directed to undirected - merge edges
|
|
138
|
-
WARN("Edge attributes are not preserved when converting from directed to undirected "
|
|
139
|
-
"graphs.");
|
|
140
|
-
|
|
141
|
-
std::set<std::pair<node, node>> addedEdges;
|
|
142
|
-
other.forEdges([&](node u, node v, edgeweight w, [[maybe_unused]] edgeid id) {
|
|
143
|
-
std::pair<node, node> edge = {std::min(u, v), std::max(u, v)};
|
|
144
|
-
if (addedEdges.find(edge) == addedEdges.end()) {
|
|
145
|
-
addEdge(edge.first, edge.second, weighted ? w : defaultEdgeWeight);
|
|
146
|
-
addedEdges.insert(edge);
|
|
147
|
-
} else if (weighted) {
|
|
148
|
-
// Merge weights for existing edge
|
|
149
|
-
edgeweight currentWeight = weight(edge.first, edge.second);
|
|
150
|
-
setWeight(edge.first, edge.second, edgeMerger(currentWeight, w));
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
} else {
|
|
154
|
-
// Converting undirected to directed - add both directions
|
|
155
|
-
WARN("Edge attributes are currently not preserved when converting from undirected to "
|
|
156
|
-
"directed graphs.");
|
|
157
|
-
|
|
158
|
-
other.forEdges([&](node u, node v, edgeweight w, [[maybe_unused]] edgeid id) {
|
|
159
|
-
addEdge(u, v, weighted ? w : defaultEdgeWeight);
|
|
160
|
-
if (u != v) {
|
|
161
|
-
addEdge(v, u, weighted ? w : defaultEdgeWeight);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (edgesIndexed && !other.hasEdgeIds()) {
|
|
167
|
-
indexEdges(true);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/** move constructor */
|
|
172
|
-
GraphW(GraphW &&other) noexcept
|
|
173
|
-
: Graph(std::move(other)), inEdges(std::move(other.inEdges)),
|
|
174
|
-
outEdges(std::move(other.outEdges)), inEdgeWeights(std::move(other.inEdgeWeights)),
|
|
175
|
-
outEdgeWeights(std::move(other.outEdgeWeights)), inEdgeIds(std::move(other.inEdgeIds)),
|
|
176
|
-
outEdgeIds(std::move(other.outEdgeIds)) {}
|
|
177
|
-
|
|
178
|
-
/** move constructor */
|
|
179
|
-
GraphW(Graph &&other) noexcept : Graph(std::move(other)) { initializeVectorStructures(); }
|
|
180
|
-
|
|
181
|
-
/** Default destructor */
|
|
182
|
-
~GraphW() override = default;
|
|
183
|
-
|
|
184
|
-
/** move assignment operator */
|
|
185
|
-
GraphW &operator=(GraphW &&other) noexcept {
|
|
186
|
-
if (this != &other) {
|
|
187
|
-
Graph::operator=(std::move(other));
|
|
188
|
-
inEdges = std::move(other.inEdges);
|
|
189
|
-
outEdges = std::move(other.outEdges);
|
|
190
|
-
inEdgeWeights = std::move(other.inEdgeWeights);
|
|
191
|
-
outEdgeWeights = std::move(other.outEdgeWeights);
|
|
192
|
-
inEdgeIds = std::move(other.inEdgeIds);
|
|
193
|
-
outEdgeIds = std::move(other.outEdgeIds);
|
|
194
|
-
}
|
|
195
|
-
return *this;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/** move assignment operator */
|
|
199
|
-
GraphW &operator=(Graph &&other) noexcept {
|
|
200
|
-
Graph::operator=(std::move(other));
|
|
201
|
-
// Clear existing vectors before reinitializing to avoid keeping old edge data
|
|
202
|
-
inEdges.clear();
|
|
203
|
-
outEdges.clear();
|
|
204
|
-
inEdgeWeights.clear();
|
|
205
|
-
outEdgeWeights.clear();
|
|
206
|
-
inEdgeIds.clear();
|
|
207
|
-
outEdgeIds.clear();
|
|
208
|
-
initializeVectorStructures();
|
|
209
|
-
return *this;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/** copy assignment operator */
|
|
213
|
-
GraphW &operator=(const GraphW &other) {
|
|
214
|
-
Graph::operator=(other);
|
|
215
|
-
inEdges = other.inEdges;
|
|
216
|
-
outEdges = other.outEdges;
|
|
217
|
-
inEdgeWeights = other.inEdgeWeights;
|
|
218
|
-
outEdgeWeights = other.outEdgeWeights;
|
|
219
|
-
inEdgeIds = other.inEdgeIds;
|
|
220
|
-
outEdgeIds = other.outEdgeIds;
|
|
221
|
-
return *this;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/** copy assignment operator */
|
|
225
|
-
GraphW &operator=(const Graph &other) {
|
|
226
|
-
Graph::operator=(other);
|
|
227
|
-
// Clear existing vectors before reinitializing to avoid keeping old edge data
|
|
228
|
-
inEdges.clear();
|
|
229
|
-
outEdges.clear();
|
|
230
|
-
inEdgeWeights.clear();
|
|
231
|
-
outEdgeWeights.clear();
|
|
232
|
-
inEdgeIds.clear();
|
|
233
|
-
outEdgeIds.clear();
|
|
234
|
-
initializeVectorStructures();
|
|
235
|
-
return *this;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/** EDGE IDS **/
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Initially assign integer edge identifiers.
|
|
242
|
-
*
|
|
243
|
-
* @param force Force re-indexing of edges even if they have already been
|
|
244
|
-
* indexed
|
|
245
|
-
*/
|
|
246
|
-
void indexEdges(bool force = false);
|
|
247
|
-
|
|
248
|
-
/** GRAPH INFORMATION **/
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Try to save some memory by shrinking internal data structures of the
|
|
252
|
-
* graph. Only run this once you finished editing the graph. Otherwise it
|
|
253
|
-
* will cause unnecessary reallocation of memory.
|
|
254
|
-
*/
|
|
255
|
-
void shrinkToFit();
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* DEPRECATED: this function will no longer be supported in later releases.
|
|
259
|
-
* Compacts the adjacency arrays by re-using no longer needed slots from
|
|
260
|
-
* deleted edges.
|
|
261
|
-
*/
|
|
262
|
-
void TLX_DEPRECATED(compactEdges());
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Sorts the outgoing neighbors of a given node according to a user-defined comparison function.
|
|
266
|
-
*
|
|
267
|
-
* @param u The node whose outgoing neighbors will be sorted.
|
|
268
|
-
* @param lambda A binary predicate used to compare two neighbors. The predicate should
|
|
269
|
-
* take two nodes as arguments and return true if the first node should
|
|
270
|
-
* precede the second in the sorted order.
|
|
271
|
-
*/
|
|
272
|
-
template <typename Lambda>
|
|
273
|
-
void sortNeighbors(node u, Lambda lambda) {
|
|
274
|
-
assert(hasNode(u));
|
|
275
|
-
|
|
276
|
-
if ((degreeIn(u) < 2) && (degree(u) < 2)) {
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// Sort the outEdge-Attributes
|
|
281
|
-
std::vector<index> outIndices(outEdges[u].size());
|
|
282
|
-
std::iota(outIndices.begin(), outIndices.end(), 0);
|
|
283
|
-
std::ranges::sort(outIndices,
|
|
284
|
-
[&](index a, index b) { return lambda(outEdges[u][a], outEdges[u][b]); });
|
|
285
|
-
|
|
286
|
-
Aux::ArrayTools::applyPermutation(outEdges[u].begin(), outEdges[u].end(),
|
|
287
|
-
outIndices.begin());
|
|
288
|
-
|
|
289
|
-
if (weighted) {
|
|
290
|
-
Aux::ArrayTools::applyPermutation(outEdgeWeights[u].begin(), outEdgeWeights[u].end(),
|
|
291
|
-
outIndices.begin());
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (edgesIndexed) {
|
|
295
|
-
Aux::ArrayTools::applyPermutation(outEdgeIds[u].begin(), outEdgeIds[u].end(),
|
|
296
|
-
outIndices.begin());
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (directed) {
|
|
300
|
-
// Sort in-edges by the same ordering (by target node)
|
|
301
|
-
// First, find the permutation that sorts inEdges[u] by the corresponding outEdges
|
|
302
|
-
std::vector<index> inIndices(inEdges[u].size());
|
|
303
|
-
std::iota(inIndices.begin(), inIndices.end(), 0);
|
|
304
|
-
std::ranges::sort(
|
|
305
|
-
inIndices, [&](index a, index b) { return lambda(inEdges[u][a], inEdges[u][b]); });
|
|
306
|
-
Aux::ArrayTools::applyPermutation(inEdges[u].begin(), inEdges[u].end(),
|
|
307
|
-
inIndices.begin());
|
|
308
|
-
|
|
309
|
-
if (edgesIndexed) {
|
|
310
|
-
Aux::ArrayTools::applyPermutation(inEdgeIds[u].begin(), inEdgeIds[u].end(),
|
|
311
|
-
inIndices.begin());
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Sorts the adjacency arrays by node id. While the running time is linear
|
|
318
|
-
* this temporarily duplicates the memory.
|
|
319
|
-
*/
|
|
320
|
-
void sortEdges();
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Sorts the adjacency arrays by a custom criterion.
|
|
324
|
-
*
|
|
325
|
-
* @param lambda Lambda function used to sort the edges. It takes two WeightedEdge
|
|
326
|
-
* e1 and e2 as input parameters, returns true if e1 < e2, false otherwise.
|
|
327
|
-
*/
|
|
328
|
-
template <class Lambda>
|
|
329
|
-
void sortEdges(Lambda lambda) {
|
|
330
|
-
parallelForNodes([&](node u) {
|
|
331
|
-
if (isWeighted()) {
|
|
332
|
-
std::vector<WeightedEdge> edges;
|
|
333
|
-
forNeighborsOf(u, [&](node v, edgeweight w) { edges.emplace_back(u, v, w); });
|
|
334
|
-
std::sort(edges.begin(), edges.end(), lambda);
|
|
335
|
-
|
|
336
|
-
removePartialOutEdges(unsafe, u);
|
|
337
|
-
for (const auto &edge : edges) {
|
|
338
|
-
addPartialOutEdge(unsafe, edge.u, edge.v, edge.weight);
|
|
339
|
-
}
|
|
340
|
-
} else {
|
|
341
|
-
std::vector<node> neighbors(outEdges[u]);
|
|
342
|
-
std::sort(neighbors.begin(), neighbors.end(), [&](node v1, node v2) {
|
|
343
|
-
return lambda(WeightedEdge(u, v1, defaultEdgeWeight),
|
|
344
|
-
WeightedEdge(u, v2, defaultEdgeWeight));
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
removePartialOutEdges(unsafe, u);
|
|
348
|
-
for (node v : neighbors) {
|
|
349
|
-
addPartialOutEdge(unsafe, u, v);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Set edge count of the graph to edges.
|
|
357
|
-
* @param edges the edge count of a graph
|
|
358
|
-
*/
|
|
359
|
-
void setEdgeCount(Unsafe, count edges) { m = edges; }
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Set upper bound of edge count.
|
|
363
|
-
*
|
|
364
|
-
* @param newBound New upper edge id bound.
|
|
365
|
-
*/
|
|
366
|
-
void setUpperEdgeIdBound(Unsafe, edgeid newBound) { omega = newBound; }
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Set the number of self-loops.
|
|
370
|
-
*
|
|
371
|
-
* @param loops New number of self-loops.
|
|
372
|
-
*/
|
|
373
|
-
void setNumberOfSelfLoops(Unsafe, count loops) { storedNumberOfSelfLoops = loops; }
|
|
374
|
-
|
|
375
|
-
/* NODE MODIFIERS */
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Add a new node to the graph and return it.
|
|
379
|
-
* @return The new node.
|
|
380
|
-
*/
|
|
381
|
-
node addNode();
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Add numberOfNewNodes new nodes.
|
|
385
|
-
* @param numberOfNewNodes Number of new nodes.
|
|
386
|
-
* @return The index of the last node added.
|
|
387
|
-
*/
|
|
388
|
-
node addNodes(count numberOfNewNodes);
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Remove a node @a v and all incident edges from the graph.
|
|
392
|
-
*
|
|
393
|
-
* Incoming as well as outgoing edges will be removed.
|
|
394
|
-
*
|
|
395
|
-
* @param v Node.
|
|
396
|
-
*/
|
|
397
|
-
void removeNode(node v);
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Removes out-going edges from node @u. If the graph is weighted and/or has edge ids, weights
|
|
401
|
-
* and/or edge ids will also be removed.
|
|
402
|
-
*
|
|
403
|
-
* @param u Node.
|
|
404
|
-
*/
|
|
405
|
-
void removePartialOutEdges(Unsafe, node u) {
|
|
406
|
-
assert(hasNode(u));
|
|
407
|
-
outEdges[u].clear();
|
|
408
|
-
if (isWeighted()) {
|
|
409
|
-
outEdgeWeights[u].clear();
|
|
410
|
-
}
|
|
411
|
-
if (hasEdgeIds()) {
|
|
412
|
-
outEdgeIds[u].clear();
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Removes in-going edges to node @u. If the graph is weighted and/or has edge ids, weights
|
|
418
|
-
* and/or edge ids will also be removed.
|
|
419
|
-
*
|
|
420
|
-
* @param u Node.
|
|
421
|
-
*/
|
|
422
|
-
void removePartialInEdges(Unsafe, node u) {
|
|
423
|
-
assert(hasNode(u));
|
|
424
|
-
inEdges[u].clear();
|
|
425
|
-
if (isWeighted()) {
|
|
426
|
-
inEdgeWeights[u].clear();
|
|
427
|
-
}
|
|
428
|
-
if (hasEdgeIds()) {
|
|
429
|
-
inEdgeIds[u].clear();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Restores a previously deleted node @a v with its previous id in the
|
|
435
|
-
* graph.
|
|
436
|
-
*
|
|
437
|
-
* @param v Node.
|
|
438
|
-
*
|
|
439
|
-
*/
|
|
440
|
-
void restoreNode(node v);
|
|
441
|
-
|
|
442
|
-
/* EDGE MODIFIERS */
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Insert an edge between the nodes @a u and @a v. If the graph is
|
|
446
|
-
* weighted you can optionally set a weight for this edge. The default
|
|
447
|
-
* weight is 1.0. Note: Multi-edges are not supported and will NOT be
|
|
448
|
-
* handled consistently by the graph data structure. It is possible to check
|
|
449
|
-
* for multi-edges by enabling parameter "checkForMultiEdges". If already present,
|
|
450
|
-
* the new edge is not inserted. Enabling this check increases the complexity of the function
|
|
451
|
-
* to O(max(deg(u), deg(v))).
|
|
452
|
-
* @param u Endpoint of edge.
|
|
453
|
-
* @param v Endpoint of edge.
|
|
454
|
-
* @param ew Optional edge weight.
|
|
455
|
-
* @param checkMultiEdge If true, this enables a check for a possible multi-edge.
|
|
456
|
-
* @return @c true if edge has been added, false otherwise (in case checkMultiEdge is set to
|
|
457
|
-
* true and the new edge would have been a multi-edge.)
|
|
458
|
-
*/
|
|
459
|
-
bool addEdge(node u, node v, edgeweight ew = defaultEdgeWeight, bool checkMultiEdge = false);
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Insert an edge between the nodes @a u and @a v. Unlike the addEdge function, this function
|
|
463
|
-
* does not add any information to v. If the graph is weighted you can optionally set a
|
|
464
|
-
* weight for this edge. The default weight is 1.0. Note: Multi-edges are not supported and will
|
|
465
|
-
* NOT be handled consistently by the graph data structure. It is possible to check
|
|
466
|
-
* for multi-edges by enabling parameter "checkForMultiEdges". If already present,
|
|
467
|
-
* the new edge is not inserted. Enabling this check increases the complexity of the function
|
|
468
|
-
* to O(max(deg(u), deg(v))).
|
|
469
|
-
* @param u Endpoint of edge.
|
|
470
|
-
* @param v Endpoint of edge.
|
|
471
|
-
* @param ew Optional edge weight.
|
|
472
|
-
* @param index Optional edge index.
|
|
473
|
-
* @param checkForMultiEdges If true, this enables a check for a possible multi-edge.
|
|
474
|
-
* @return @c true if edge has been added, false otherwise (in case checkMultiEdge is set to
|
|
475
|
-
* true and the new edge would have been a multi-edge.)
|
|
476
|
-
*/
|
|
477
|
-
bool addPartialEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight,
|
|
478
|
-
uint64_t index = 0, bool checkForMultiEdges = false);
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Insert an in edge between the nodes @a u and @a v in a directed graph. If the graph is
|
|
482
|
-
* weighted you can optionally set a weight for this edge. The default
|
|
483
|
-
* weight is 1.0. Note: Multi-edges are not supported and will NOT be
|
|
484
|
-
* handled consistently by the graph data structure. It is possible to check
|
|
485
|
-
* for multi-edges by enabling parameter "checkForMultiEdges". If already present,
|
|
486
|
-
* the new edge is not inserted. Enabling this check increases the complexity of the function
|
|
487
|
-
* to O(max(deg(u), deg(v))).
|
|
488
|
-
* @param u Endpoint of edge.
|
|
489
|
-
* @param v Endpoint of edge.
|
|
490
|
-
* @param ew Optional edge weight.
|
|
491
|
-
* @param index Optional edge index.
|
|
492
|
-
* @param checkForMultiEdges If true, this enables a check for a possible multi-edge.
|
|
493
|
-
* @return @c true if edge has been added, false otherwise (in case checkMultiEdge is set to
|
|
494
|
-
* true and the new edge would have been a multi-edge.)
|
|
495
|
-
*/
|
|
496
|
-
bool addPartialInEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight,
|
|
497
|
-
uint64_t index = 0, bool checkForMultiEdges = false);
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Insert an out edge between the nodes @a u and @a v in a directed graph. If the graph is
|
|
501
|
-
* weighted you can optionally set a weight for this edge. The default
|
|
502
|
-
* weight is 1.0. Note: Multi-edges are not supported and will NOT be
|
|
503
|
-
* handled consistently by the graph data structure. It is possible to check
|
|
504
|
-
* for multi-edges by enabling parameter "checkForMultiEdges". If already present,
|
|
505
|
-
* the new edge is not inserted. Enabling this check increases the complexity of the function
|
|
506
|
-
* to O(max(deg(u), deg(v))).
|
|
507
|
-
* @param u Endpoint of edge.
|
|
508
|
-
* @param v Endpoint of edge.
|
|
509
|
-
* @param ew Optional edge weight.
|
|
510
|
-
* @param index Optional edge index.
|
|
511
|
-
* @param checkForMultiEdges If true, this enables a check for a possible multi-edge.
|
|
512
|
-
* @return @c true if edge has been added, false otherwise (in case checkMultiEdge is set to
|
|
513
|
-
* true and the new edge would have been a multi-edge.)
|
|
514
|
-
*/
|
|
515
|
-
bool addPartialOutEdge(Unsafe, node u, node v, edgeweight ew = defaultEdgeWeight,
|
|
516
|
-
uint64_t index = 0, bool checkForMultiEdges = false);
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* If set to true, the ingoing and outgoing adjacency vectors will
|
|
520
|
-
* automatically be updated to maintain a sorting (if it existed before) by performing up to n-1
|
|
521
|
-
* swaps. If the user plans to remove multiple edges, better set it to false and call
|
|
522
|
-
* sortEdges() afterwards to avoid redundant swaps. Default = true.
|
|
523
|
-
*/
|
|
524
|
-
void setKeepEdgesSorted(bool sorted = true) { maintainSortedEdges = sorted; }
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* If set to true, the EdgeIDs will automatically be adjusted,
|
|
528
|
-
* so that no gaps in between IDs exist. If the user plans to remove multiple edges, better set
|
|
529
|
-
* it to false and call indexEdges(force=true) afterwards to avoid redundant re-indexing.
|
|
530
|
-
* Default = true.
|
|
531
|
-
*/
|
|
532
|
-
void setMaintainCompactEdges(bool compact = true) { maintainCompactEdges = compact; }
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Removes the undirected edge {@a u,@a v}.
|
|
536
|
-
* @param u Endpoint of edge.
|
|
537
|
-
* @param v Endpoint of edge.
|
|
538
|
-
*/
|
|
539
|
-
void removeEdge(node u, node v);
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Removes all the edges in the graph.
|
|
543
|
-
*/
|
|
544
|
-
void removeAllEdges();
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Removes edges adjacent to a node according to a specific criterion.
|
|
548
|
-
*
|
|
549
|
-
* @param u The node whose adjacent edges shall be removed.
|
|
550
|
-
* @param condition A function that takes a node as an input and returns a
|
|
551
|
-
* bool. If true the edge (u, v) is removed.
|
|
552
|
-
* @param edgesIn Whether in-going or out-going edges shall be removed.
|
|
553
|
-
* @return std::pair<count, count> The number of removed edges (first) and the number of removed
|
|
554
|
-
* self-loops (second).
|
|
555
|
-
*/
|
|
556
|
-
template <typename Condition>
|
|
557
|
-
std::pair<count, count> removeAdjacentEdges(node u, Condition condition, bool edgesIn = false) {
|
|
558
|
-
count removedEdges = 0;
|
|
559
|
-
count removedSelfLoops = 0;
|
|
560
|
-
|
|
561
|
-
// For directed graphs, this function is supposed to be called twice: one to remove
|
|
562
|
-
// out-edges, and one to remove in-edges.
|
|
563
|
-
auto &edges_ = edgesIn ? inEdges[u] : outEdges[u];
|
|
564
|
-
for (index vi = 0; vi < edges_.size();) {
|
|
565
|
-
if (condition(edges_[vi])) {
|
|
566
|
-
const auto isSelfLoop = (edges_[vi] == u);
|
|
567
|
-
removedSelfLoops += isSelfLoop;
|
|
568
|
-
removedEdges += !isSelfLoop;
|
|
569
|
-
edges_[vi] = edges_.back();
|
|
570
|
-
edges_.pop_back();
|
|
571
|
-
if (isWeighted()) {
|
|
572
|
-
auto &weights_ = edgesIn ? inEdgeWeights[u] : outEdgeWeights[u];
|
|
573
|
-
weights_[vi] = weights_.back();
|
|
574
|
-
weights_.pop_back();
|
|
575
|
-
}
|
|
576
|
-
if (hasEdgeIds()) {
|
|
577
|
-
auto &edgeIds_ = edgesIn ? inEdgeIds[u] : outEdgeIds[u];
|
|
578
|
-
edgeIds_[vi] = edgeIds_.back();
|
|
579
|
-
edgeIds_.pop_back();
|
|
580
|
-
}
|
|
581
|
-
} else {
|
|
582
|
-
++vi;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
return {removedEdges, removedSelfLoops};
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Removes all self-loops in the graph.
|
|
591
|
-
*/
|
|
592
|
-
void removeSelfLoops();
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Removes all multi-edges in the graph.
|
|
596
|
-
*/
|
|
597
|
-
void removeMultiEdges();
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* Changes the edges {@a s1, @a t1} into {@a s1, @a t2} and the edge {@a
|
|
601
|
-
* s2,
|
|
602
|
-
* @a t2} into {@a s2, @a t1}.
|
|
603
|
-
*
|
|
604
|
-
* If there are edge weights or edge ids, they are preserved. Note that no
|
|
605
|
-
* check is performed if the swap is actually possible, i.e. does not
|
|
606
|
-
* generate duplicate edges.
|
|
607
|
-
*
|
|
608
|
-
* @param s1 The first source
|
|
609
|
-
* @param t1 The first target
|
|
610
|
-
* @param s2 The second source
|
|
611
|
-
* @param t2 The second target
|
|
612
|
-
*/
|
|
613
|
-
void swapEdge(node s1, node t1, node s2, node t2);
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Return edge weight of edge {@a u,@a v}. Returns 0 if edge does not
|
|
617
|
-
* exist. BEWARE: Running time is \Theta(deg(u))!
|
|
618
|
-
*
|
|
619
|
-
* @param u Endpoint of edge.
|
|
620
|
-
* @param v Endpoint of edge.
|
|
621
|
-
* @return Edge weight of edge {@a u,@a v} or 0 if edge does not exist.
|
|
622
|
-
*/
|
|
623
|
-
edgeweight weight(node u, node v) const override;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Set edge weight of edge {@a u,@a v}. BEWARE: Running time is \Theta(deg(u))!
|
|
627
|
-
*
|
|
628
|
-
* @param u Endpoint of edge.
|
|
629
|
-
* @param v Endpoint of edge.
|
|
630
|
-
* @param ew New edge weight.
|
|
631
|
-
*/
|
|
632
|
-
void setWeight(node u, node v, edgeweight ew);
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* Set edge weight of the @a i-th outgoing edge of node @a u. BEWARE: Running time is constant.
|
|
636
|
-
*
|
|
637
|
-
* @param u Endpoint of edge.
|
|
638
|
-
* @param i Index of the outgoing edge.
|
|
639
|
-
* @param ew New edge weight.
|
|
640
|
-
*/
|
|
641
|
-
void setWeightAtIthNeighbor(Unsafe, node u, index i, edgeweight ew) override;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Set edge weight of the @a i-th incoming edge of node @a u. BEWARE: Running time is constant.
|
|
645
|
-
*
|
|
646
|
-
* @param u Endpoint of edge.
|
|
647
|
-
* @param i Index of the incoming edge.
|
|
648
|
-
* @param ew New edge weight.
|
|
649
|
-
*/
|
|
650
|
-
void setWeightAtIthInNeighbor(Unsafe, node u, index i, edgeweight ew) override;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Increase edge weight of edge {@a u,@a v} by @a ew. BEWARE: Running time is \Theta(deg(u))!
|
|
654
|
-
*
|
|
655
|
-
* @param u Endpoint of edge.
|
|
656
|
-
* @param v Endpoint of edge.
|
|
657
|
-
* @param ew Edge weight increase.
|
|
658
|
-
*/
|
|
659
|
-
void increaseWeight(node u, node v, edgeweight ew);
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Reserves memory in the node's edge containers for undirected graphs.
|
|
663
|
-
*
|
|
664
|
-
* @param u the node memory should be reserved for
|
|
665
|
-
* @param size the amount of memory to reserve
|
|
666
|
-
*
|
|
667
|
-
* This function is thread-safe if called from different
|
|
668
|
-
* threads on different nodes.
|
|
669
|
-
*/
|
|
670
|
-
void preallocateUndirected(node u, size_t size);
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Reserves memory in the node's edge containers for directed graphs.
|
|
674
|
-
*
|
|
675
|
-
* @param u the node memory should be reserved for
|
|
676
|
-
* @param inSize the amount of memory to reserve for in edges
|
|
677
|
-
* @param outSize the amount of memory to reserve for out edges
|
|
678
|
-
*
|
|
679
|
-
* This function is thread-safe if called from different
|
|
680
|
-
* threads on different nodes.
|
|
681
|
-
*/
|
|
682
|
-
void preallocateDirected(node u, size_t outSize, size_t inSize);
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Reserves memory in the node's edge containers for directed graphs.
|
|
686
|
-
*
|
|
687
|
-
* @param u the node memory should be reserved for
|
|
688
|
-
* @param outSize the amount of memory to reserve for out edges
|
|
689
|
-
*
|
|
690
|
-
* This function is thread-safe if called from different
|
|
691
|
-
* threads on different nodes.
|
|
692
|
-
*/
|
|
693
|
-
void preallocateDirectedOutEdges(node u, size_t outSize);
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* Reserves memory in the node's edge containers for directed graphs.
|
|
697
|
-
*
|
|
698
|
-
* @param u the node memory should be reserved for
|
|
699
|
-
* @param inSize the amount of memory to reserve for in edges
|
|
700
|
-
*
|
|
701
|
-
* This function is thread-safe if called from different
|
|
702
|
-
* threads on different nodes.
|
|
703
|
-
*/
|
|
704
|
-
void preallocateDirectedInEdges(node u, size_t inSize);
|
|
705
|
-
|
|
706
|
-
// Override base class methods to provide vector-based implementations
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Returns the number of outgoing neighbors of @a v.
|
|
710
|
-
*
|
|
711
|
-
* @param v Node.
|
|
712
|
-
* @return The number of outgoing neighbors.
|
|
713
|
-
*/
|
|
714
|
-
count degree(node v) const override {
|
|
715
|
-
assert(hasNode(v));
|
|
716
|
-
return outEdges[v].size();
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
count degreeIn(node v) const override {
|
|
720
|
-
assert(hasNode(v));
|
|
721
|
-
if (directed) {
|
|
722
|
-
return inEdges[v].size();
|
|
723
|
-
}
|
|
724
|
-
return outEdges[v].size();
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
bool isIsolated(node v) const override {
|
|
728
|
-
if (!hasNode(v))
|
|
729
|
-
throw std::runtime_error("Error, the node does not exist!");
|
|
730
|
-
if (directed) {
|
|
731
|
-
return outEdges[v].size() == 0 && inEdges[v].size() == 0;
|
|
732
|
-
}
|
|
733
|
-
return outEdges[v].size() == 0;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
edgeid edgeId(node u, node v) const override;
|
|
737
|
-
|
|
738
|
-
index indexInOutEdgeArray(node u, node v) const override;
|
|
739
|
-
|
|
740
|
-
index indexInInEdgeArray(node v, node u) const override;
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* Return the i-th (outgoing) neighbor of @a u.
|
|
744
|
-
*
|
|
745
|
-
* @param u Node.
|
|
746
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
747
|
-
* @return @a i-th (outgoing) neighbor of @a u, or @c none if no such
|
|
748
|
-
* neighbor exists.
|
|
749
|
-
*/
|
|
750
|
-
node getIthNeighbor(Unsafe, node u, index i) const override { return outEdges[u][i]; }
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* Return the weight to the i-th (outgoing) neighbor of @a u.
|
|
754
|
-
*
|
|
755
|
-
* @param u Node.
|
|
756
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
757
|
-
* @return @a edge weight to the i-th (outgoing) neighbor of @a u, or @c +inf if no such
|
|
758
|
-
* neighbor exists.
|
|
759
|
-
*/
|
|
760
|
-
edgeweight getIthNeighborWeight(Unsafe, node u, index i) const {
|
|
761
|
-
return isWeighted() ? outEdgeWeights[u][i] : defaultEdgeWeight;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Return the i-th (outgoing) neighbor of @a u.
|
|
766
|
-
*
|
|
767
|
-
* @param u Node.
|
|
768
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
769
|
-
* @return @a i-th (outgoing) neighbor of @a u, or @c none if no such
|
|
770
|
-
* neighbor exists.
|
|
771
|
-
*/
|
|
772
|
-
node getIthNeighbor(node u, index i) const override {
|
|
773
|
-
if (!hasNode(u) || i >= outEdges[u].size())
|
|
774
|
-
return none;
|
|
775
|
-
return outEdges[u][i];
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* Return the i-th (incoming) neighbor of @a u.
|
|
780
|
-
*
|
|
781
|
-
* @param u Node.
|
|
782
|
-
* @param i index; should be in [0, degreeIn(u))
|
|
783
|
-
* @return @a i-th (incoming) neighbor of @a u, or @c none if no such
|
|
784
|
-
* neighbor exists.
|
|
785
|
-
*/
|
|
786
|
-
node getIthInNeighbor(node u, index i) const override {
|
|
787
|
-
if (!hasNode(u) || i >= inEdges[u].size())
|
|
788
|
-
return none;
|
|
789
|
-
return inEdges[u][i];
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Return the weight to the i-th (outgoing) neighbor of @a u.
|
|
794
|
-
*
|
|
795
|
-
* @param u Node.
|
|
796
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
797
|
-
* @return @a edge weight to the i-th (outgoing) neighbor of @a u, or @c +inf if no such
|
|
798
|
-
* neighbor exists.
|
|
799
|
-
*/
|
|
800
|
-
edgeweight getIthNeighborWeight(node u, index i) const override {
|
|
801
|
-
if (!hasNode(u) || i >= outEdges[u].size())
|
|
802
|
-
return nullWeight;
|
|
803
|
-
return isWeighted() ? outEdgeWeights[u][i] : defaultEdgeWeight;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* Get i-th (outgoing) neighbor of @a u and the corresponding edge weight.
|
|
808
|
-
*
|
|
809
|
-
* @param u Node.
|
|
810
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
811
|
-
* @return pair: i-th (outgoing) neighbor of @a u and the corresponding
|
|
812
|
-
* edge weight, or @c defaultEdgeWeight if unweighted.
|
|
813
|
-
*/
|
|
814
|
-
std::pair<node, edgeweight> getIthNeighborWithWeight(node u, index i) const override {
|
|
815
|
-
if (!hasNode(u) || i >= outEdges[u].size())
|
|
816
|
-
return {none, none};
|
|
817
|
-
return getIthNeighborWithWeight(unsafe, u, i);
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Get i-th (outgoing) neighbor of @a u and the corresponding edge weight.
|
|
822
|
-
*
|
|
823
|
-
* @param u Node.
|
|
824
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
825
|
-
* @return pair: i-th (outgoing) neighbor of @a u and the corresponding
|
|
826
|
-
* edge weight, or @c defaultEdgeWeight if unweighted.
|
|
827
|
-
*/
|
|
828
|
-
std::pair<node, edgeweight> getIthNeighborWithWeight(Unsafe, node u, index i) const {
|
|
829
|
-
if (!isWeighted())
|
|
830
|
-
return {outEdges[u][i], defaultEdgeWeight};
|
|
831
|
-
return {outEdges[u][i], outEdgeWeights[u][i]};
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Get i-th (outgoing) neighbor of @a u and the corresponding edge id.
|
|
836
|
-
*
|
|
837
|
-
* @param u Node.
|
|
838
|
-
* @param i index; should be in [0, degreeOut(u))
|
|
839
|
-
* @return pair: i-th (outgoing) neighbor of @a u and the corresponding
|
|
840
|
-
* edge id, or @c none if no such neighbor exists.
|
|
841
|
-
*/
|
|
842
|
-
std::pair<node, edgeid> getIthNeighborWithId(node u, index i) const override {
|
|
843
|
-
assert(hasEdgeIds());
|
|
844
|
-
if (!hasNode(u) || i >= outEdges[u].size())
|
|
845
|
-
return {none, none};
|
|
846
|
-
return {outEdges[u][i], outEdgeIds[u][i]};
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
private:
|
|
850
|
-
// Override template method implementations to use vector-based storage
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Returns the edge weight of the outgoing edge of index i in the outgoing
|
|
854
|
-
* edges of node u
|
|
855
|
-
* @param u The node
|
|
856
|
-
* @param i The index
|
|
857
|
-
* @return The weight of the outgoing edge or defaultEdgeWeight if the graph
|
|
858
|
-
* is unweighted
|
|
859
|
-
*/
|
|
860
|
-
template <bool hasWeights>
|
|
861
|
-
inline edgeweight getOutEdgeWeight(node u, index i) const;
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* Returns the edge weight of the incoming edge of index i in the incoming
|
|
865
|
-
* edges of node u
|
|
866
|
-
*
|
|
867
|
-
* @param u The node
|
|
868
|
-
* @param i The index in the incoming edge array
|
|
869
|
-
* @return The weight of the incoming edge
|
|
870
|
-
*/
|
|
871
|
-
template <bool hasWeights>
|
|
872
|
-
inline edgeweight getInEdgeWeight(node u, index i) const;
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* Returns the edge id of the edge of index i in the outgoing edges of node
|
|
876
|
-
* u
|
|
877
|
-
*
|
|
878
|
-
* @param u The node
|
|
879
|
-
* @param i The index in the outgoing edges
|
|
880
|
-
* @return The edge id
|
|
881
|
-
*/
|
|
882
|
-
template <bool graphHasEdgeIds>
|
|
883
|
-
inline edgeid getOutEdgeId(node u, index i) const;
|
|
884
|
-
|
|
885
|
-
/**
|
|
886
|
-
* Returns the edge id of the edge of index i in the incoming edges of node
|
|
887
|
-
* u
|
|
888
|
-
*
|
|
889
|
-
* @param u The node
|
|
890
|
-
* @param i The index in the incoming edges of u
|
|
891
|
-
* @return The edge id
|
|
892
|
-
*/
|
|
893
|
-
template <bool graphHasEdgeIds>
|
|
894
|
-
inline edgeid getInEdgeId(node u, index i) const;
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* @brief Returns if the edge (u, v) shall be used in the iteration of all
|
|
898
|
-
* edgesIndexed
|
|
899
|
-
*
|
|
900
|
-
* @param u The source node of the edge
|
|
901
|
-
* @param v The target node of the edge
|
|
902
|
-
* @return If the node shall be used, i.e. if v is not none and in the
|
|
903
|
-
* undirected case if u >= v
|
|
904
|
-
*/
|
|
905
|
-
template <bool graphIsDirected>
|
|
906
|
-
inline bool useEdgeInIteration(node u, node v) const;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* @brief Implementation of the for loop for outgoing edges of u
|
|
910
|
-
*
|
|
911
|
-
* Note: If all (valid) outgoing edges shall be considered, graphIsDirected
|
|
912
|
-
* needs to be set to true
|
|
913
|
-
*
|
|
914
|
-
* @param u The node
|
|
915
|
-
* @param handle The handle that shall be executed for each edge
|
|
916
|
-
* @return void
|
|
917
|
-
*/
|
|
918
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
919
|
-
inline void forOutEdgesOfImpl(node u, L handle) const;
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* @brief Implementation of the for loop for incoming edges of u
|
|
923
|
-
*
|
|
924
|
-
* For undirected graphs, this is the same as forOutEdgesOfImpl but u and v
|
|
925
|
-
* are changed in the handle
|
|
926
|
-
*
|
|
927
|
-
* @param u The node
|
|
928
|
-
* @param handle The handle that shall be executed for each edge
|
|
929
|
-
* @return void
|
|
930
|
-
*/
|
|
931
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
932
|
-
inline void forInEdgesOfImpl(node u, L handle) const;
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* @brief Summation variant of the parallel for loop for all edges, @see
|
|
936
|
-
* parallelSumForEdges
|
|
937
|
-
*
|
|
938
|
-
* @param handle The handle that shall be executed for all edges
|
|
939
|
-
* @return void
|
|
940
|
-
*/
|
|
941
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
942
|
-
inline double parallelSumForEdgesImpl(L handle) const;
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* @brief Override for vector-based edge iteration
|
|
946
|
-
*/
|
|
947
|
-
void
|
|
948
|
-
forEdgesVirtualImpl(bool directed, bool weighted, bool hasEdgeIds,
|
|
949
|
-
std::function<void(node, node, edgeweight, edgeid)> handle) const override;
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* @brief Override for vector-based forEdgesOf
|
|
953
|
-
*/
|
|
954
|
-
void forEdgesOfVirtualImpl(
|
|
955
|
-
node u, bool directed, bool weighted, bool hasEdgeIds,
|
|
956
|
-
std::function<void(node, node, edgeweight, edgeid)> handle) const override;
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* @brief Override for vector-based forInEdgesOf
|
|
960
|
-
*/
|
|
961
|
-
void forInEdgesVirtualImpl(
|
|
962
|
-
node u, bool directed, bool weighted, bool hasEdgeIds,
|
|
963
|
-
std::function<void(node, node, edgeweight, edgeid)> handle) const override;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* @brief Override for vector-based parallelSumForEdges
|
|
967
|
-
*/
|
|
968
|
-
double parallelSumForEdgesVirtualImpl(
|
|
969
|
-
bool directed, bool weighted, bool hasEdgeIds,
|
|
970
|
-
std::function<double(node, node, edgeweight, edgeid)> handle) const override;
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* @brief Override for hasEdge - vector-based implementation
|
|
974
|
-
*/
|
|
975
|
-
bool hasEdgeImpl(node u, node v) const override;
|
|
976
|
-
|
|
977
|
-
protected:
|
|
978
|
-
/**
|
|
979
|
-
* Get neighbors as a vector (vector-based implementation)
|
|
980
|
-
*/
|
|
981
|
-
std::vector<node> getNeighborsVector(node u, bool inEdges = false) const override;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Get neighbors with weights as vectors (vector-based implementation)
|
|
985
|
-
*/
|
|
986
|
-
std::pair<std::vector<node>, std::vector<edgeweight>>
|
|
987
|
-
getNeighborsWithWeightsVector(node u, bool inEdges = false) const override;
|
|
988
|
-
|
|
989
|
-
public:
|
|
990
|
-
/**
|
|
991
|
-
* Wrapper class to iterate over a range of the neighbors of a node within
|
|
992
|
-
* a for loop.
|
|
993
|
-
*/
|
|
994
|
-
template <bool InEdges = false>
|
|
995
|
-
class NeighborRange {
|
|
996
|
-
const GraphW *G;
|
|
997
|
-
node u{none};
|
|
998
|
-
|
|
999
|
-
public:
|
|
1000
|
-
NeighborRange(const GraphW &G, node u) : G(&G), u(u) { assert(G.hasNode(u)); };
|
|
1001
|
-
|
|
1002
|
-
NeighborRange() : G(nullptr){};
|
|
1003
|
-
|
|
1004
|
-
NeighborIterator begin() const {
|
|
1005
|
-
assert(G);
|
|
1006
|
-
return InEdges ? NeighborIterator(G->inEdges[u].begin())
|
|
1007
|
-
: NeighborIterator(G->outEdges[u].begin());
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
NeighborIterator end() const {
|
|
1011
|
-
assert(G);
|
|
1012
|
-
return InEdges ? NeighborIterator(G->inEdges[u].end())
|
|
1013
|
-
: NeighborIterator(G->outEdges[u].end());
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
// Conversion operator to Graph::NeighborRange for Cython compatibility
|
|
1017
|
-
operator typename Graph::NeighborRange<InEdges>() const {
|
|
1018
|
-
throw std::runtime_error(
|
|
1019
|
-
"Conversion from GraphW::NeighborRange to Graph::NeighborRange not supported - "
|
|
1020
|
-
"iterator methods not implemented in base Graph class");
|
|
1021
|
-
}
|
|
1022
|
-
};
|
|
1023
|
-
|
|
1024
|
-
using OutNeighborRange = NeighborRange<false>;
|
|
1025
|
-
using InNeighborRange = NeighborRange<true>;
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* Wrapper class to iterate over a range of the neighbors of a node
|
|
1029
|
-
* including the edge weights within a for loop.
|
|
1030
|
-
* Values are std::pair<node, edgeweight>.
|
|
1031
|
-
*/
|
|
1032
|
-
template <bool InEdges = false>
|
|
1033
|
-
class NeighborWeightRange {
|
|
1034
|
-
const GraphW *G;
|
|
1035
|
-
node u{none};
|
|
1036
|
-
|
|
1037
|
-
public:
|
|
1038
|
-
NeighborWeightRange(const GraphW &G, node u) : G(&G), u(u) { assert(G.hasNode(u)); };
|
|
1039
|
-
|
|
1040
|
-
NeighborWeightRange() : G(nullptr){};
|
|
1041
|
-
|
|
1042
|
-
NeighborWeightIterator begin() const {
|
|
1043
|
-
assert(G);
|
|
1044
|
-
return InEdges
|
|
1045
|
-
? NeighborWeightIterator(G->inEdges[u].begin(), G->inEdgeWeights[u].begin())
|
|
1046
|
-
: NeighborWeightIterator(G->outEdges[u].begin(),
|
|
1047
|
-
G->outEdgeWeights[u].begin());
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
NeighborWeightIterator end() const {
|
|
1051
|
-
assert(G);
|
|
1052
|
-
return InEdges
|
|
1053
|
-
? NeighborWeightIterator(G->inEdges[u].end(), G->inEdgeWeights[u].end())
|
|
1054
|
-
: NeighborWeightIterator(G->outEdges[u].end(), G->outEdgeWeights[u].end());
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
// Conversion operator to Graph::NeighborWeightRange for Cython compatibility
|
|
1058
|
-
operator typename Graph::NeighborWeightRange<InEdges>() const {
|
|
1059
|
-
throw std::runtime_error(
|
|
1060
|
-
"Conversion from GraphW::NeighborWeightRange to Graph::NeighborWeightRange not "
|
|
1061
|
-
"supported - iterator methods not implemented in base Graph class");
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
|
|
1065
|
-
using OutNeighborWeightRange = NeighborWeightRange<false>;
|
|
1066
|
-
using InNeighborWeightRange = NeighborWeightRange<true>;
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* Get an iterable range over the neighbors of @a.
|
|
1070
|
-
*
|
|
1071
|
-
* @param u Node.
|
|
1072
|
-
* @return Iterator range over the neighbors of @a u.
|
|
1073
|
-
*/
|
|
1074
|
-
NeighborRange<false> neighborRange(node u) const {
|
|
1075
|
-
assert(exists[u]);
|
|
1076
|
-
return NeighborRange<false>(*this, u);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* Get an iterable range over the neighbors of @a u including the edge
|
|
1081
|
-
* weights.
|
|
1082
|
-
*
|
|
1083
|
-
* @param u Node.
|
|
1084
|
-
* @return Iterator range over pairs of neighbors of @a u and corresponding
|
|
1085
|
-
* edge weights.
|
|
1086
|
-
*/
|
|
1087
|
-
NeighborWeightRange<false> weightNeighborRange(node u) const {
|
|
1088
|
-
assert(isWeighted());
|
|
1089
|
-
assert(exists[u]);
|
|
1090
|
-
return NeighborWeightRange<false>(*this, u);
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* Get an iterable range over the in-neighbors of @a.
|
|
1095
|
-
*
|
|
1096
|
-
* @param u Node.
|
|
1097
|
-
* @return Iterator range over pairs of in-neighbors of @a u.
|
|
1098
|
-
*/
|
|
1099
|
-
NeighborRange<true> inNeighborRange(node u) const {
|
|
1100
|
-
assert(isDirected());
|
|
1101
|
-
assert(exists[u]);
|
|
1102
|
-
return NeighborRange<true>(*this, u);
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Get an iterable range over the in-neighbors of @a u including the
|
|
1107
|
-
* edge weights.
|
|
1108
|
-
*
|
|
1109
|
-
* @param u Node.
|
|
1110
|
-
* @return Iterator range over pairs of in-neighbors of @a u and corresponding
|
|
1111
|
-
* edge weights.
|
|
1112
|
-
*/
|
|
1113
|
-
NeighborWeightRange<true> weightInNeighborRange(node u) const {
|
|
1114
|
-
assert(isDirected() && isWeighted());
|
|
1115
|
-
assert(exists[u]);
|
|
1116
|
-
return NeighborWeightRange<true>(*this, u);
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
// Template method implementations for GraphW
|
|
1121
|
-
|
|
1122
|
-
// implementation for weighted == true
|
|
1123
|
-
template <bool hasWeights>
|
|
1124
|
-
inline edgeweight GraphW::getOutEdgeWeight(node u, index i) const {
|
|
1125
|
-
return outEdgeWeights[u][i];
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// implementation for weighted == false
|
|
1129
|
-
template <>
|
|
1130
|
-
inline edgeweight GraphW::getOutEdgeWeight<false>(node, index) const {
|
|
1131
|
-
return defaultEdgeWeight;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
// implementation for weighted == true
|
|
1135
|
-
template <bool hasWeights>
|
|
1136
|
-
inline edgeweight GraphW::getInEdgeWeight(node u, index i) const {
|
|
1137
|
-
return inEdgeWeights[u][i];
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
// implementation for weighted == false
|
|
1141
|
-
template <>
|
|
1142
|
-
inline edgeweight GraphW::getInEdgeWeight<false>(node, index) const {
|
|
1143
|
-
return defaultEdgeWeight;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
// implementation for hasEdgeIds == true
|
|
1147
|
-
template <bool graphHasEdgeIds>
|
|
1148
|
-
inline edgeid GraphW::getOutEdgeId(node u, index i) const {
|
|
1149
|
-
return outEdgeIds[u][i];
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
// implementation for hasEdgeIds == false
|
|
1153
|
-
template <>
|
|
1154
|
-
inline edgeid GraphW::getOutEdgeId<false>(node, index) const {
|
|
1155
|
-
return none;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
// implementation for hasEdgeIds == true
|
|
1159
|
-
template <bool graphHasEdgeIds>
|
|
1160
|
-
inline edgeid GraphW::getInEdgeId(node u, index i) const {
|
|
1161
|
-
return inEdgeIds[u][i];
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
// implementation for hasEdgeIds == false
|
|
1165
|
-
template <>
|
|
1166
|
-
inline edgeid GraphW::getInEdgeId<false>(node, index) const {
|
|
1167
|
-
return none;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
// implementation for graphIsDirected == true
|
|
1171
|
-
template <bool graphIsDirected>
|
|
1172
|
-
inline bool GraphW::useEdgeInIteration(node /* u */, node /* v */) const {
|
|
1173
|
-
return true;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
// implementation for graphIsDirected == false
|
|
1177
|
-
template <>
|
|
1178
|
-
inline bool GraphW::useEdgeInIteration<false>(node u, node v) const {
|
|
1179
|
-
return u >= v;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
1183
|
-
inline void GraphW::forOutEdgesOfImpl(node u, L handle) const {
|
|
1184
|
-
for (index i = 0; i < outEdges[u].size(); ++i) {
|
|
1185
|
-
node v = outEdges[u][i];
|
|
1186
|
-
|
|
1187
|
-
if (useEdgeInIteration<graphIsDirected>(u, v)) {
|
|
1188
|
-
Graph::edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i),
|
|
1189
|
-
getOutEdgeId<graphHasEdgeIds>(u, i));
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
1195
|
-
inline void GraphW::forInEdgesOfImpl(node u, L handle) const {
|
|
1196
|
-
if (graphIsDirected) {
|
|
1197
|
-
for (index i = 0; i < inEdges[u].size(); i++) {
|
|
1198
|
-
node v = inEdges[u][i];
|
|
1199
|
-
|
|
1200
|
-
Graph::edgeLambda<L>(handle, u, v, getInEdgeWeight<hasWeights>(u, i),
|
|
1201
|
-
getInEdgeId<graphHasEdgeIds>(u, i));
|
|
1202
|
-
}
|
|
1203
|
-
} else {
|
|
1204
|
-
for (index i = 0; i < outEdges[u].size(); ++i) {
|
|
1205
|
-
node v = outEdges[u][i];
|
|
1206
|
-
|
|
1207
|
-
Graph::edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i),
|
|
1208
|
-
getOutEdgeId<graphHasEdgeIds>(u, i));
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
template <bool graphIsDirected, bool hasWeights, bool graphHasEdgeIds, typename L>
|
|
1214
|
-
inline double GraphW::parallelSumForEdgesImpl(L handle) const {
|
|
1215
|
-
double sum = 0.0;
|
|
1216
|
-
|
|
1217
|
-
#pragma omp parallel for reduction(+ : sum)
|
|
1218
|
-
for (omp_index u = 0; u < static_cast<omp_index>(z); ++u) {
|
|
1219
|
-
for (index i = 0; i < outEdges[u].size(); ++i) {
|
|
1220
|
-
node v = outEdges[u][i];
|
|
1221
|
-
|
|
1222
|
-
// undirected, do not iterate over edges twice
|
|
1223
|
-
// {u, v} instead of (u, v); if v == none, u > v is not fulfilled
|
|
1224
|
-
if (useEdgeInIteration<graphIsDirected>(u, v)) {
|
|
1225
|
-
sum += Graph::edgeLambda<L>(handle, u, v, getOutEdgeWeight<hasWeights>(u, i),
|
|
1226
|
-
getOutEdgeId<graphHasEdgeIds>(u, i));
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
return sum;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
} /* namespace NetworKit */
|
|
1235
|
-
|
|
1236
|
-
#endif // NETWORKIT_GRAPH_GRAPH_W_HPP_
|