FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.RandGraphFactory.Graph Class Reference

A graph. More...

Public Member Functions

 Graph (List< String > nodes, Edge[] edges, List< List< String > > components, Map< String, Set< String > > neighborhoods, HashMap< String, List< String > > clusters)
 Constructor.
String toString ()
double computeDensity ()
int computeMaxDeg ()

Public Attributes

List< String > nodes
 List of nodes.
Edge[] edges
 List of edges.
List< List< String > > components
 Components of the graph.
HashMap< String, Integer > componentOf
 For each node, the index of its connected component.
Map< String, Set< String > > neighborhoods
 For each node, the set of its neighbors.
HashMap< String, List< String > > clusters
 Node clusters, indexed by their names.
Map< String, String > clusterOf
 The name of the cluster each node belongs to.

Detailed Description

A graph.

Nodes are represented by Integers, starting at 0, prefixed with the letter "x".

Constructor & Destructor Documentation

◆ Graph()

frodo2.algorithms.RandGraphFactory.Graph.Graph ( List< String > nodes,
Edge[] edges,
List< List< String > > components,
Map< String, Set< String > > neighborhoods,
HashMap< String, List< String > > clusters )

Constructor.

Parameters
nodeslist of nodes
edgeslist of edges
componentscomponents of the graph
neighborhoodsfor each node, the list of its neighbors
clusterslist of node clusters

References clusterOf, clusters, components, edges, neighborhoods, and nodes.

Member Function Documentation

◆ computeDensity()

double frodo2.algorithms.RandGraphFactory.Graph.computeDensity ( )
Returns
the p1 density, computed as the number of edges divided by the maximum possible number of edges

Referenced by frodo2.benchmarks.maxdiscsp.MaxDisCSPProblemGenerator.generateProblem().

◆ computeMaxDeg()

int frodo2.algorithms.RandGraphFactory.Graph.computeMaxDeg ( )
Returns
the highest degree (i.e. number of neighbors) of any given node

Referenced by frodo2.benchmarks.maxdiscsp.MaxDisCSPProblemGenerator.generateProblem().

◆ toString()

String frodo2.algorithms.RandGraphFactory.Graph.toString ( )
Returns
DOT representation of the graph

References clusters, edges, and nodes.

Member Data Documentation

◆ clusterOf

Map<String, String> frodo2.algorithms.RandGraphFactory.Graph.clusterOf

The name of the cluster each node belongs to.

Referenced by frodo2.algorithms.test.AllTests.generateProblem(), and Graph().

◆ clusters

HashMap< String, List <String> > frodo2.algorithms.RandGraphFactory.Graph.clusters

◆ componentOf

HashMap<String, Integer> frodo2.algorithms.RandGraphFactory.Graph.componentOf

For each node, the index of its connected component.

Referenced by frodo2.algorithms.RandGraphFactory.getNiceRandGraph().

◆ components

List< List<String> > frodo2.algorithms.RandGraphFactory.Graph.components

◆ edges

◆ neighborhoods

Map< String, Set <String> > frodo2.algorithms.RandGraphFactory.Graph.neighborhoods

◆ nodes


The documentation for this class was generated from the following file: