|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Generator of random graphs. More...
Classes | |
| class | Graph |
| A graph. More... | |
| class | Edge |
| An edge. More... | |
Static Public Member Functions | |
| static Graph | getSizedRandGraph (int nbrNodes, int nbrEdges, int nbrClusters) |
| Creates a random graph with the desired size. | |
| static Graph | getRandGraph (int maxNbrNodes, int maxNbrEdges, int maxNbrClusters) |
| Generates a random undirected graph. | |
| static Graph | getNiceRandGraph (int maxNbrNodes, int maxNbrEdges, int maxNbrClusters) |
| Generates a random graph in which, for each cluster, all variables in that cluster belong to the same graph component. | |
| static Graph | getRandGraph (int maxNbrNodes, int maxNbrEdges) |
| Generates a random undirected graph. | |
| static Graph | getRingGraph (int nbrNodes) |
| Generates a ring of the input size, without specified clusters. | |
| static Graph | getSquareGrid (int side) |
| Generates a square grid of the desired size. | |
| static Graph | getAcyclicGraph (int nbrNodes, int branchingFactor) |
| Generates a single-component, acyclic graph of the desired size, with the desired branching factor. | |
| static Graph | getChordalGraph (int nbrNodes, double rateOfChords) |
| Generates a chordal graph. | |
Generator of random graphs.
|
static |
Generates a single-component, acyclic graph of the desired size, with the desired branching factor.
| nbrNodes | the number of nodes |
| branchingFactor | each node has at most (branchingFactor + 1) neighbors |
Referenced by frodo2.benchmarks.party.PartyGame.generateAcyclicProblem(), frodo2.benchmarks.party.PartyGame.main(), and frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.test().
|
static |
Generates a chordal graph.
| nbrNodes | the number of nodes |
| rateOfChords | rateOfChords % of the edges are chords |
References frodo2.algorithms.RandGraphFactory.Graph.components, frodo2.algorithms.RandGraphFactory.Graph.edges, getRingGraph(), frodo2.algorithms.RandGraphFactory.Graph.neighborhoods, and frodo2.algorithms.RandGraphFactory.Graph.nodes.
Referenced by frodo2.benchmarks.party.PartyGame.generateChordalProblem(), and frodo2.benchmarks.party.PartyGame.main().

|
static |
Generates a random graph in which, for each cluster, all variables in that cluster belong to the same graph component.
| maxNbrNodes | max number of nodes |
| maxNbrEdges | max number of edges |
| maxNbrClusters | max number of clusters; if 0, no clusters are created |
References frodo2.algorithms.RandGraphFactory.Graph.clusters, frodo2.algorithms.RandGraphFactory.Graph.componentOf, and getRandGraph().
Referenced by frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.setUp(), frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.setUp(), and frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.setUp().

|
static |
Generates a random undirected graph.
The graph contains at least 2 nodes. There can be only at most 1 edge between any two given nodes.
| maxNbrNodes | maximum number of nodes. Must be at least 2. |
| maxNbrEdges | maximum number of edges |
References getRandGraph().

|
static |
Generates a random undirected graph.
The graph contains at least 2 nodes. There can be only at most 1 edge between any two given nodes.
| maxNbrNodes | maximum number of nodes. Must be at least 2. |
| maxNbrEdges | maximum number of edges |
| maxNbrClusters | maximum number of clusters; if 0, no clusters are created |
References getSizedRandGraph().
Referenced by frodo2.algorithms.test.AllTests.createRandProblem(), frodo2.algorithms.test.AllTests.createRandProblem(), frodo2.algorithms.test.AllTests.createRandProblem(), frodo2.algorithms.test.AllTests.createRandProblem(), getNiceRandGraph(), getRandGraph(), frodo2.algorithms.dpop.privacy.test.SecureRerootingTest.randomTest(), frodo2.algorithms.adopt.test.testADOPT.setUp(), frodo2.algorithms.adopt.test.testPreprocessing.setUp(), frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.asodpop.tests.ASODPOPTest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.count.test.TestCountSolutions.setUp(), frodo2.algorithms.dpop.param.test.ParamDPOPtest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.param.test.ParamVALUEtest< U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.privacy.test.SecureCircularRoutingTest.setUp(), frodo2.algorithms.dpop.privacy.test.VariableObfuscationTest< V extends Addable< V > >.setUp(), frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.setUp(), frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.setUp(), frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.setUp(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.setUp(), frodo2.algorithms.duct.tests.DUCTagentChildSearchTest.setUp(), frodo2.algorithms.duct.tests.DUCTagentChildTest.setUp(), frodo2.algorithms.duct.tests.DUCTagentPruningSearchTest.setUp(), frodo2.algorithms.duct.tests.DUCTagentPruningTest.setUp(), frodo2.algorithms.duct.tests.DUCTagentTest.setUp(), frodo2.algorithms.duct.tests.NormalizeInfTest.setUp(), frodo2.algorithms.duct.tests.NormalizeTest.setUp(), frodo2.algorithms.localSearch.dsa.tests.TestDSA< U extends Addable< U > >.setUp(), frodo2.algorithms.odpop.tests.UTILpropagationTest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.setUp(), frodo2.algorithms.test.ProblemTest.setUp(), frodo2.algorithms.test.XCSPparserTest.setUp(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.setUp(), frodo2.algorithms.varOrdering.election.tests.LeaderElectionMaxIDTest< S extends Comparable< S > >.setUp(), frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< S extends Comparable< S > &Serializable >.setUp(), frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.setUp(), and frodo2.controller.TestController.setUp().

|
static |
Generates a ring of the input size, without specified clusters.
| nbrNodes | the desired number of nodes |
Referenced by frodo2.benchmarks.party.PartyGame.generateRingProblem(), getChordalGraph(), and frodo2.benchmarks.party.PartyGame.main().
|
static |
Creates a random graph with the desired size.
There can be only at most 1 edge between any two given nodes.
| nbrNodes | number of nodes |
| nbrEdges | number of edges |
| nbrClusters | number of clusters; if 0, no clusters are created |
References frodo2.algorithms.RandGraphFactory.Edge.dest.
Referenced by frodo2.algorithms.test.AllTests.createSizedRandProblem(), frodo2.benchmarks.maxdiscsp.MaxDisCSPProblemGenerator.createSizedRandProblem(), getRandGraph(), and frodo2.benchmarks.graphcoloring.GraphColoring.GraphColoring().
|
static |
Generates a square grid of the desired size.
| side | the graph contains side*side nodes |
Referenced by frodo2.benchmarks.party.PartyGame.generateGridProblem(), and frodo2.benchmarks.party.PartyGame.main().