Package teamwork :: Package policy :: Module pwlTable
[hide private]
[frames] | no frames]

Module pwlTable

source code

Classes [hide private]
  PWLTable
Tabular representation of a PWL function, as an alternative to KeyedTree
Functions [hide private]
str
attrString(attr)
Returns: a happy string representation of the given attribute
source code
str
getProbRep(vector, side=True)
Returns: for probabilistic tuples, returns a unary constraint represenation of this vector
source code
str
getArrayRep(a, b, side=True)
Returns: for binary array, returns a unary constraint representation of this vector
source code
float or bool
solveTuple(a, b=None)
Solves a 2-dimensional vector for one of the variables
source code
 
detectConflict(vector1, side1, vector2, side2)
Detects whether there is a conflict between two attribute-value pairs, where each attribute is a binary, 2-dimensional vector
source code
Function Details [hide private]

attrString(attr)

source code 
Returns: str
a happy string representation of the given attribute

getProbRep(vector, side=True)

source code 
Returns: str
for probabilistic tuples, returns a unary constraint represenation of this vector

getArrayRep(a, b, side=True)

source code 
Returns: str
for binary array, returns a unary constraint representation of this vector

solveTuple(a, b=None)

source code 

Solves a 2-dimensional vector for one of the variables

Parameters:
Returns: float or bool
-b/(a-b) if a!=b; otherwise, True iff b>0

detectConflict(vector1, side1, vector2, side2)

source code 

Detects whether there is a conflict between two attribute-value pairs, where each attribute is a binary, 2-dimensional vector

Parameters:
Returns:
True if there is a conflict