il2.model
Class Table
Object
Index
Table
- All Implemented Interfaces:
- SubDomain
- Direct Known Subclasses:
- MPETable
public class Table
- extends Index
- Since:
- 20031031
- Author:
- james d park
Method Summary |
Table |
conditionalize(Index fixedIndex)
|
static Table |
constantTable(Domain d,
double val)
|
Table |
copy()
|
static Table |
createCompatible(Index index)
|
Index |
createCompatibleIndex()
|
void |
divideRelevantInto(double[] d)
|
double |
dotProduct(Table t2)
|
static Table |
evidenceTable(Domain d,
int var,
int val)
|
Table |
forget(int var)
|
Table |
forget(IntSet fvars)
|
double |
getCompatibleEntry(int[] globalState)
|
static Table |
indicatorTable(Domain d,
int var)
|
Table |
invert()
|
void |
invertInPlace()
|
Table |
makeCDF(int freeVar)
|
Table |
makeCPT(int var)
|
Table |
makeCumulative(Index fixedIndex)
|
int[] |
maxAssignment()
returns assignment of variables to values with highest value |
Table |
maximize(int var)
|
Table |
maximize(IntSet fvars)
|
static void |
maximizeInto(double[] big,
double[] small,
int[][] boIndex)
|
void |
maximizeInto(Table big,
int[][] boIndex)
|
int |
maxIndex()
|
static void |
maxOut(Index ind,
double[] vals,
int var,
double[] dest)
|
static Table[] |
miniMultiplyAndForget(Collection tables,
int var,
int size)
|
static Table[] |
miniMultiplyAndForget(Collection tables,
int var,
int size,
boolean sumSmallest)
|
static Table[] |
miniMultiplyAndMaximize(Collection tables,
int var,
int size)
|
Table |
multiply(Table t2)
|
static Table |
multiplyAll(Collection tables)
|
void |
multiplyAndProjectInto(Table[] tables)
|
void |
multiplyAndProjectMaxInto(Table[] tables)
|
void |
multiplyByConstant(double val)
|
static void |
multiplyInto(double[] small,
double[] big,
int[][] boIndex)
|
void |
multiplyInto(Table small)
|
void |
multiplyInto(Table small,
int[][] boIndex)
|
void |
multiplyInto2(Table t)
|
void |
multiplyVarIndicators(int var,
double[] vals)
|
void |
multiplyVarIndicators(int var,
int val)
|
Table |
normalize()
|
void |
normalizeInPlace()
|
static void |
projectInto(double[] big,
double[] small,
int[][] boIndex)
|
void |
projectInto(Table big)
|
void |
projectInto(Table big,
int[][] boIndex)
|
void |
projectInto2(Table big)
|
Table |
projectOnto(int var)
|
static void |
selectOut(Index ind,
double[] values,
int var,
int val,
double[] dest)
|
void |
setToProduct(Table[] tables)
|
void |
setToProduct(Table t1,
Table t2)
|
Table |
shrink(int var,
int val)
|
Table |
shrink(IntMap fixed)
|
static Table[] |
shrink(Table[] tables,
IntMap evidence)
|
void |
shrinkInto(Table sub,
IntMap settings)
|
void |
shrinkInto(Table sub,
IntMap settings,
int[] offsetMapping)
|
int[] |
simulate(Random r)
simulates an instantiation according to the Table, assuming
that it is a valid probability distribution. |
double |
simulate(Random r,
int[] inst)
simulates an instantiation according to the Table, assuming
that it is a valid probability distribution. |
Table |
squareEntries()
|
double |
sum()
|
static void |
sumOut(Index ind,
double[] vals,
int var,
double[] dest)
|
String |
toString()
|
double[] |
values()
|
static Table |
varTable(Domain d,
int var)
|
void |
zeroConciousDivideRelevantInto(double[] vals,
boolean[] zc)
|
void |
zeroConciousMakeReal(boolean[] zc)
|
void |
zeroConciousMultiplyInto(Table t,
boolean[] zc)
|
void |
zeroConciousMultiplyVarIndicators(int var,
int val,
boolean[] zc)
|
void |
zeroConciousProjectInto(Table big,
boolean[] zc,
boolean[] zcDest)
|
Table |
zeroConciousProjectOnto(int var,
boolean[] zc,
boolean[] zcDest)
|
void |
zeroConciousRealProjectInto(Table big,
boolean[] zc)
|
Table |
zeroConciousRealProjectOnto(int var,
boolean[] zc)
|
Methods inherited from class Index |
baselineIndex, baselineOffsetIndex, combineWith, complementaryIndex, complementaryIndex, createBigIndex, domain, flipChange, forgetIndex, forgetIndex, forgetIndex, getIndexFromFullInstance, miniPartition, next, nextSafe, offset, offsetIndex, separatorIndex, setFullInstanceFromIndex, shrinkIndex, sizeBig, sizeDouble, sizeInt, sizeLong, sizes, stepSizes, vars, varString |
Table
public Table(Domain d,
IntSet vars)
Table
public Table(Index index,
double[] vals)
Table
public Table(Domain d,
IntSet vars,
double[] vals)
createCompatible
public static Table createCompatible(Index index)
copy
public Table copy()
squareEntries
public Table squareEntries()
createCompatibleIndex
public Index createCompatibleIndex()
evidenceTable
public static Table evidenceTable(Domain d,
int var,
int val)
varTable
public static Table varTable(Domain d,
int var)
constantTable
public static Table constantTable(Domain d,
double val)
indicatorTable
public static Table indicatorTable(Domain d,
int var)
shrink
public static Table[] shrink(Table[] tables,
IntMap evidence)
projectInto
public void projectInto(Table big)
projectInto
public void projectInto(Table big,
int[][] boIndex)
projectInto
public static void projectInto(double[] big,
double[] small,
int[][] boIndex)
maximizeInto
public void maximizeInto(Table big,
int[][] boIndex)
maximizeInto
public static void maximizeInto(double[] big,
double[] small,
int[][] boIndex)
multiplyInto
public static void multiplyInto(double[] small,
double[] big,
int[][] boIndex)
multiplyInto
public void multiplyInto(Table small)
multiplyInto
public void multiplyInto(Table small,
int[][] boIndex)
forget
public Table forget(IntSet fvars)
miniMultiplyAndForget
public static Table[] miniMultiplyAndForget(Collection tables,
int var,
int size)
miniMultiplyAndForget
public static Table[] miniMultiplyAndForget(Collection tables,
int var,
int size,
boolean sumSmallest)
miniMultiplyAndMaximize
public static Table[] miniMultiplyAndMaximize(Collection tables,
int var,
int size)
multiplyByConstant
public void multiplyByConstant(double val)
multiplyAll
public static Table multiplyAll(Collection tables)
multiply
public Table multiply(Table t2)
setToProduct
public void setToProduct(Table[] tables)
projectInto2
public void projectInto2(Table big)
multiplyInto2
public void multiplyInto2(Table t)
multiplyAndProjectInto
public void multiplyAndProjectInto(Table[] tables)
multiplyAndProjectMaxInto
public void multiplyAndProjectMaxInto(Table[] tables)
setToProduct
public void setToProduct(Table t1,
Table t2)
maximize
public Table maximize(IntSet fvars)
forget
public Table forget(int var)
sumOut
public static void sumOut(Index ind,
double[] vals,
int var,
double[] dest)
maximize
public Table maximize(int var)
maxOut
public static void maxOut(Index ind,
double[] vals,
int var,
double[] dest)
shrinkInto
public void shrinkInto(Table sub,
IntMap settings)
shrinkInto
public void shrinkInto(Table sub,
IntMap settings,
int[] offsetMapping)
shrink
public Table shrink(IntMap fixed)
values
public double[] values()
shrink
public Table shrink(int var,
int val)
selectOut
public static void selectOut(Index ind,
double[] values,
int var,
int val,
double[] dest)
toString
public String toString()
- Overrides:
toString
in class Object
sum
public double sum()
projectOnto
public Table projectOnto(int var)
normalizeInPlace
public void normalizeInPlace()
normalize
public Table normalize()
invertInPlace
public void invertInPlace()
invert
public Table invert()
makeCPT
public Table makeCPT(int var)
conditionalize
public Table conditionalize(Index fixedIndex)
makeCDF
public Table makeCDF(int freeVar)
makeCumulative
public Table makeCumulative(Index fixedIndex)
divideRelevantInto
public void divideRelevantInto(double[] d)
multiplyVarIndicators
public void multiplyVarIndicators(int var,
int val)
multiplyVarIndicators
public void multiplyVarIndicators(int var,
double[] vals)
zeroConciousMultiplyInto
public void zeroConciousMultiplyInto(Table t,
boolean[] zc)
zeroConciousMultiplyVarIndicators
public void zeroConciousMultiplyVarIndicators(int var,
int val,
boolean[] zc)
zeroConciousRealProjectInto
public void zeroConciousRealProjectInto(Table big,
boolean[] zc)
zeroConciousProjectInto
public void zeroConciousProjectInto(Table big,
boolean[] zc,
boolean[] zcDest)
zeroConciousDivideRelevantInto
public void zeroConciousDivideRelevantInto(double[] vals,
boolean[] zc)
zeroConciousMakeReal
public void zeroConciousMakeReal(boolean[] zc)
zeroConciousProjectOnto
public Table zeroConciousProjectOnto(int var,
boolean[] zc,
boolean[] zcDest)
zeroConciousRealProjectOnto
public Table zeroConciousRealProjectOnto(int var,
boolean[] zc)
getCompatibleEntry
public double getCompatibleEntry(int[] globalState)
dotProduct
public double dotProduct(Table t2)
simulate
public int[] simulate(Random r)
- simulates an instantiation according to the Table, assuming
that it is a valid probability distribution.
simulate
public double simulate(Random r,
int[] inst)
- simulates an instantiation according to the Table, assuming
that it is a valid probability distribution.
maxIndex
public int maxIndex()
maxAssignment
public int[] maxAssignment()
- returns assignment of variables to values with highest value
Copyright 2010 UCLA Automated Reasoning Group