FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > > Class Template Reference

The view of the DFS from one variable. More...

Inheritance diagram for frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >:

Public Member Functions

 DFSview (String id)
 Constructor.
DFSview< V, U > clone ()
String toString ()
String getID ()
List< String > getPseudoChildren (String child)
 Returns the (immutable) list of pseudo-children below the input child.
void addChild (String child)
 Adds a child.
List< String > removeChild (String child)
 Removes a child.
void changeChild (String oldChild, String newChild)
 Changes one child into another.
void addPseudoChild (String pseudo)
 Adds a pseudo-child below the last child.
void addPseudoChild (String pseudo, List< String > partialPath)
 Adds a pseudo child below the last child.
void addPseudoChild (String child, String pseudo)
 Adds a pseudo-child.
void addPseudoChild (String child, String pseudo, List< String > partialPath)
 Adds a pseudo child.
void removePseudoChild (String pseudo)
 Removes a pseudo-child.
void setParent (String var, String agent)
 Sets the parent.
void addPseudoParent (String var)
 Adds a pseudo-parent.
String getParent ()
String getParentAgent ()
List< String > getChildren ()
List< String > getPseudoParents ()
List< String > getAllPseudoChildren ()
void removePseudoParent (String var)
 Removes a pseudo-parent.
List< String > getPathToPseudoChild (String pseudo)
 Returns the partial path to the input pseudo-child.
List< ? extends UtilitySolutionSpace< V, U > > getSpaces ()
void setSpaces (List< ? extends UtilitySolutionSpace< V, U > > spaces)
 Sets the list of constraints this variable is responsible for enforcing.

Private Attributes

final String id
 This cluster's ID.
ArrayList< String > pseudoParents = new ArrayList<String> ()
 The list of pseudo-parents.
String parent
 The parent variable, if any.
String parentAgent
 The parent agent, if any.
ArrayList< String > children = new ArrayList<String> ()
 The list of children.
HashMap< String, List< String > > pseudoChildren = new HashMap< String, List<String> > ()
 For each child, the list of pseudo-children below that child.
HashMap< String, List< String > > pathsToPseudoChildren = new HashMap< String, List<String> > ()
 For each pseudo-child, a partial path that leads to it.
List< ? extends UtilitySolutionSpace< V, U > > spaces
 The list of constraints this variable is responsible for enforcing.

Static Private Attributes

static final long serialVersionUID = -4589293255218453960L
 Used for serialization.

Detailed Description

The view of the DFS from one variable.

Parameters
<V>the type used for variable values
<U>the type used for utility values

Constructor & Destructor Documentation

◆ DFSview()

frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.DFSview ( String id)

Constructor.

Parameters
idthis cluster's ID

References id.

Referenced by clone().

Member Function Documentation

◆ addChild()

◆ addPseudoChild() [1/4]

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.addPseudoChild ( String child,
String pseudo )

Adds a pseudo-child.

Parameters
childthe child under which to add the new pseudo-child
pseudothe new pseudo-child

◆ addPseudoChild() [2/4]

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.addPseudoChild ( String child,
String pseudo,
List< String > partialPath )

Adds a pseudo child.

Parameters
childthe child under which to add the new pseudo-child
pseudothe new pseudo-child
partialPaththe partial path to that pseudo-child

References addPseudoChild().

Here is the call graph for this function:

◆ addPseudoChild() [3/4]

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.addPseudoChild ( String pseudo)

Adds a pseudo-child below the last child.

Parameters
pseudothe new pseudo-child
Todo
: got a very rare assertion error when running ODPOP tests!

References children.

Referenced by addPseudoChild(), addPseudoChild(), and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS().

◆ addPseudoChild() [4/4]

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.addPseudoChild ( String pseudo,
List< String > partialPath )

Adds a pseudo child below the last child.

Parameters
pseudothe new pseudo-child
partialPaththe partial path to that pseudo-child

References addPseudoChild().

Here is the call graph for this function:

◆ addPseudoParent()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.addPseudoParent ( String var)

Adds a pseudo-parent.

Parameters
varthe pseudo-parent variable
Todo
Also record the pseudo-parent agent?

Referenced by frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS().

◆ changeChild()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.changeChild ( String oldChild,
String newChild )

Changes one child into another.

Parameters
oldChildthe old child
newChildthe new child

References addChild(), and removeChild().

Here is the call graph for this function:

◆ clone()

DFSview< V, U > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.clone ( )
See also
java.lang.Object#clone()
Bug
Do a deep clone instead?

References DFSview(), pathsToPseudoChildren, and pseudoChildren.

Here is the call graph for this function:

◆ getAllPseudoChildren()

◆ getChildren()

List< String > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getChildren ( )
Returns
the (immutable) list of children

Referenced by frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.checkDFS(), frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.checkOutput(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.dfsToString(), frodo2.algorithms.dpop.memory.LabelingPhase< V extends Addable< V > >.notifyIn(), frodo2.algorithms.dpop.privacy.SecureCircularRouting.notifyIn(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.notifyIn(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.NormalizeInf< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.Sampling< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruning< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruningSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.parseSpaces(), frodo2.algorithms.dpop.memory.LabelingPhase< V extends Addable< V > >.printDFS(), frodo2.algorithms.adopt.test.testADOPT.startADOPT(), and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.startUTIL().

◆ getID()

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getID ( )
Returns
this cluster's ID

◆ getParent()

◆ getParentAgent()

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getParentAgent ( )
Returns
the parent agent, if any

◆ getPathToPseudoChild()

List< String > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getPathToPseudoChild ( String pseudo)

Returns the partial path to the input pseudo-child.

Parameters
pseudothe pseudo-child
Returns
the partial path to this pseudo-child

◆ getPseudoChildren()

List< String > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getPseudoChildren ( String child)

Returns the (immutable) list of pseudo-children below the input child.

Parameters
childthe child variable
Returns
the list of children below the input variable if it is a child; null if it is not a child

Referenced by getAllPseudoChildren().

◆ getPseudoParents()

◆ getSpaces()

List< ? extends UtilitySolutionSpace< V, U > > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.getSpaces ( )
Returns
The list of constraints this variable is responsible for enforcing

References spaces.

Referenced by frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.notifyIn().

◆ removeChild()

List< String > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.removeChild ( String child)

Removes a child.

Parameters
childthe new child variable
Returns
the list of pseudo-children hanging from that child

Referenced by changeChild().

◆ removePseudoChild()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.removePseudoChild ( String pseudo)

Removes a pseudo-child.

Parameters
pseudoa variable

◆ removePseudoParent()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.removePseudoParent ( String var)

Removes a pseudo-parent.

Parameters
varthe old pseudo-parent variable

◆ setParent()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.setParent ( String var,
String agent )

Sets the parent.

Parameters
varthe parent variable
agentthe parent agent

Referenced by frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS().

◆ setSpaces()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.setSpaces ( List< ? extends UtilitySolutionSpace< V, U > > spaces)

Sets the list of constraints this variable is responsible for enforcing.

Parameters
spacesthe spaces

References spaces.

Referenced by frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), and frodo2.algorithms.adopt.test.testADOPT.startADOPT().

◆ toString()

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.toString ( )
See also
java.lang.Object#toString()

Member Data Documentation

◆ children

ArrayList<String> frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.children = new ArrayList<String> ()
private

The list of children.

Referenced by addPseudoChild().

◆ id

final String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.id
private

This cluster's ID.

Referenced by DFSview().

◆ parent

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.parent
private

The parent variable, if any.

◆ parentAgent

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.parentAgent
private

The parent agent, if any.

◆ pathsToPseudoChildren

HashMap< String, List<String> > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.pathsToPseudoChildren = new HashMap< String, List<String> > ()
private

For each pseudo-child, a partial path that leads to it.

Referenced by clone().

◆ pseudoChildren

HashMap< String, List<String> > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.pseudoChildren = new HashMap< String, List<String> > ()
private

For each child, the list of pseudo-children below that child.

Referenced by clone().

◆ pseudoParents

ArrayList<String> frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.pseudoParents = new ArrayList<String> ()
private

The list of pseudo-parents.

◆ serialVersionUID

final long frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.serialVersionUID = -4589293255218453960L
staticprivate

Used for serialization.

◆ spaces

List< ? extends UtilitySolutionSpace<V, U> > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.DFSview< V extends Addable< V >, U extends Addable< U > >.spaces
private

The list of constraints this variable is responsible for enforcing.

Referenced by getSpaces(), and setSpaces().


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