|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.algorithms.graphs.tensor.Tensor
de.jstacs.algorithms.graphs.tensor.SubTensor
public class SubTensor
This Tensor can be used to extract or use only a part of a complete Tensor.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.algorithms.graphs.tensor.Tensor |
|---|
L, order, powers |
| Constructor Summary | |
|---|---|
SubTensor(Tensor t,
int offset,
int length)
This constructor creates a SubTensor using the Tensor t for the nodes offset, offset+1, ..., offset+length-1. |
|
| Method Summary | |
|---|---|
int[] |
getMaximalEdgeFor(byte k,
int child,
int... parents)
Returns the edge permute(parents[0],...,parents[k-1]) -> child that maximizes
the score. |
double |
getRootValue(int child)
Returns the value for child as root. |
double |
getValue(byte k,
int child,
int... parents)
Returns the value for the edge parents[0],...,parents[k-1] -> child. |
void |
resetValue(byte k,
int child,
int... parents)
Sets the value for the edge parents[0],...,parents[k-1] -> child to
Double.NEGATIVE_INFINITY. |
void |
setRootValue(int child,
double val)
Sets the value val for the root node child. |
void |
setValue(byte k,
double val,
int child,
int... parents)
Sets the value for the edge parents[0],...,parents[k-1] -> child. |
| Methods inherited from class de.jstacs.algorithms.graphs.tensor.Tensor |
|---|
getAsymIndex, getNumberOfNodes, getOrder, readTensorFromFile, toDouble3DArray, writeTensorToFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubTensor(Tensor t,
int offset,
int length)
SubTensor using the Tensor t for the nodes offset, offset+1, ..., offset+length-1.
t - the underlying Tensoroffset - the offset in the nodes, i.e., all nodes smaller than offset will not be usedlength - the number of nodes which will be used starting at offset| Method Detail |
|---|
public int[] getMaximalEdgeFor(byte k,
int child,
int... parents)
Tensorpermute(parents[0],...,parents[k-1]) -> child that maximizes
the score.
getMaximalEdgeFor in class Tensork - the number of parents to be usedchild - the child nodeparents - the parent nodes (only the first k will be used)
permute(parents[0],...,parents[k-1]) -> child that
maximizes the scorepublic double getRootValue(int child)
Tensorchild as root.
getRootValue in class Tensorchild - the name of the node
public double getValue(byte k,
int child,
int... parents)
Tensorparents[0],...,parents[k-1] -> child.
getValue in class Tensork - the number of parents to be usedchild - the child nodeparents - the parent nodes (only the first k will be used)
parents[0],...,parents[k-1] -> child
public void resetValue(byte k,
int child,
int... parents)
Tensorparents[0],...,parents[k-1] -> child to
Double.NEGATIVE_INFINITY.
resetValue in class Tensork - the number of parents to be usedchild - the child nodeparents - the parent nodes (only the first k will be used)
public void setRootValue(int child,
double val)
Tensorval for the root node child.
setRootValue in class Tensorchild - the name of the nodeval - the value for the node
public void setValue(byte k,
double val,
int child,
int... parents)
Tensorparents[0],...,parents[k-1] -> child.
setValue in class Tensork - the number of parents to be usedval - the new valuechild - the child nodeparents - the parent nodes (only the first k will be used)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||