FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo Class Reference

A convenience class used to store information about a variable. More...

Public Member Functions

 VariableInfo (String self)
 Constructor.
String toString ()
String decode (String codeName)
 Decodes the input variable codename.
String encode (String variable)
 Looks up the codename for a variable.
V[] getDomain (String var)
 Looks up the true domain for the input variable.
V[] getEncryptDomain (String var)
 Returns the obfuscated domain for the input variable.
void setFinalSpace (UtilitySolutionSpaceLimited< V, U, E > finalSpace)
 Set the finalSpace received by a root.
void reset ()
 Call this method at the end of an iteration to prepare this VariableInfo for the next iteration.
void setOptimalValue (int index)
 Set the optimal value from its index in the finalSpace.
boolean hasBeenRoot ()
encrypt (U value)
 Encrypt a value with the cryptoScheme.
encryptCompact (U value)
 Encrypt compactly a value with the cryptoScheme.
reencrypt (E value)
 Reencrypt a value with the cryptoScheme.
minFromTo (int from, int to)

Public Attributes

String self = null
 The variable this info corresponds to.
value = null
 The optimal value for this variable or null if this variable doesn't know its value yet.
List< String > children = null
 Children of this variable in the DFS.
LinkedList< UtilitySolutionSpace< V, U > > localSpaces = new LinkedList< UtilitySolutionSpace<V, U> > ()
 The list of spaces this variable is responsible for enforcing.
UtilitySolutionSpaceLimited< V, U, E > finalSpace
 The received solution space by a root.
int iteration = 1
 The number of iterations of the algo.
CryptoScheme< U, E,?> cs
 CryptoScheme for this variable.
int lowerB = 0
 Under bound value used to remember the dichotomy search of the ideal value.
int upperB
 Upper bound value used to remember the dichotomy search of the ideal value.
Map< String, String > cns = new HashMap<String,String> ()
 Map of the codeNames of all neighbors.
Map< String, String > reversetable = new HashMap<String,String> ()
 Reverse map with the codeNames of all neighbors.
Map< String, V[][]> domain = new HashMap<String,V[][]> ()
 Map for all domains of neighbor variables received in codeNameMsg Clear text domain in position 0.

Private Attributes

optUtil
 The optimal utility for the corresponding component.
boolean root = false
 Whether this variable is the current root.

Detailed Description

A convenience class used to store information about a variable.

Constructor & Destructor Documentation

◆ VariableInfo()

frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.VariableInfo ( String self)

Constructor.

Parameters
selfthe variable name

Member Function Documentation

◆ decode()

String frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.decode ( String codeName)

Decodes the input variable codename.

Parameters
codeNamethe codename for a neighboring variable
Returns
the true name of the corresponding variable

References reversetable.

◆ encode()

String frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.encode ( String variable)

Looks up the codename for a variable.

Parameters
variablethe variable
Returns
the corresponding codename

References cns.

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.sendToParent().

◆ encrypt()

E frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.encrypt ( U value)

Encrypt a value with the cryptoScheme.

Parameters
valuethe value to encrypt
Returns
return the encrypted value

References cs, and value.

◆ encryptCompact()

E frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.encryptCompact ( U value)

Encrypt compactly a value with the cryptoScheme.

Parameters
valuethe value to encrypt
Returns
return the encrypted value

References cs, and value.

◆ getDomain()

V[] frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.getDomain ( String var)

Looks up the true domain for the input variable.

Parameters
varthe variable
Returns
the corresponding true domain

References domain.

◆ getEncryptDomain()

V[] frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.getEncryptDomain ( String var)

Returns the obfuscated domain for the input variable.

Parameters
varthe variable
Returns
the corresponding obfuscated domain

References domain.

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.sendToParent().

◆ hasBeenRoot()

boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.hasBeenRoot ( )
Returns
if this variable has already been root (and therefore found its optimal value) or not

◆ minFromTo()

E frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.minFromTo ( int from,
int to )
Parameters
fromthe lower bound of the wanted interval
tothe upper bound of the wanted interval
Returns
the min of the values contained in the finalSpace in the interval from-to.

References frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.getUtility().

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.askDecrypt().

Here is the call graph for this function:

◆ reencrypt()

E frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.reencrypt ( E value)

Reencrypt a value with the cryptoScheme.

Parameters
valuethe value to encrypt
Returns
return the encrypted value

References cs, and value.

◆ reset()

◆ setFinalSpace()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.setFinalSpace ( UtilitySolutionSpaceLimited< V, U, E > finalSpace)

Set the finalSpace received by a root.

Parameters
finalSpacethe space received by a root in a UTIL msg

References finalSpace.

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.askDecrypt().

◆ setOptimalValue()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.setOptimalValue ( int index)

Set the optimal value from its index in the finalSpace.

Parameters
indexthe index of the optimal value in the finalSpace

◆ toString()

String frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.toString ( )
See also
java.lang.Object#toString()

References value.

Member Data Documentation

◆ children

List<String> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.children = null

Children of this variable in the DFS.

◆ cns

Map<String,String> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.cns = new HashMap<String,String> ()

Map of the codeNames of all neighbors.

Referenced by encode().

◆ cs

◆ domain

Map<String,V[][]> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.domain = new HashMap<String,V[][]> ()

Map for all domains of neighbor variables received in codeNameMsg Clear text domain in position 0.

Obfuscated domain in position 1

Referenced by getDomain(), and getEncryptDomain().

◆ finalSpace

UtilitySolutionSpaceLimited<V,U,E> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.finalSpace

The received solution space by a root.

Referenced by setFinalSpace().

◆ iteration

int frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.iteration = 1

◆ localSpaces

LinkedList< UtilitySolutionSpace<V, U> > frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.localSpaces = new LinkedList< UtilitySolutionSpace<V, U> > ()

◆ lowerB

int frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.lowerB = 0

Under bound value used to remember the dichotomy search of the ideal value.

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.askDecrypt().

◆ optUtil

U frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.optUtil
private

The optimal utility for the corresponding component.

◆ reversetable

Map<String,String> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.reversetable = new HashMap<String,String> ()

Reverse map with the codeNames of all neighbors.

Referenced by decode().

◆ root

boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.root = false
private

Whether this variable is the current root.

◆ self

String frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.self = null

◆ upperB

int frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.upperB

Upper bound value used to remember the dichotomy search of the ideal value.

Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.askDecrypt().

◆ value

V frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.value = null

The optimal value for this variable or null if this variable doesn't know its value yet.

Referenced by encrypt(), encryptCompact(), reencrypt(), and toString().


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