public class ParentSet extends java.lang.Object implements java.io.Serializable, RevisionHandler
Constructor and Description |
---|
ParentSet()
default constructor
|
ParentSet(int nMaxNrOfParents)
constructor
|
ParentSet(ParentSet other)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addParent(int nParent,
Instances _Instances)
Add parent to parent set and update internals (specifically the cardinality of the parent set)
|
void |
addParent(int nParent,
int iParent,
Instances _Instances)
Add parent to parent set at specific location
and update internals (specifically the cardinality of the parent set)
|
boolean |
contains(int iNode)
test if node is contained in parent set
|
void |
copy(ParentSet other)
Copy makes current parents set equal to other parent set
|
void |
deleteLastParent(Instances _Instances)
Delete last added parent from parent set and update internals (specifically the cardinality of the parent set)
|
int |
deleteParent(int nParent,
Instances _Instances)
delete node from parent set
|
int |
getCardinalityOfParents()
returns cardinality of parents
|
int |
getFreshCardinalityOfParents(Instances _Instances)
returns cardinality of parents after recalculation
|
int |
getNrOfParents()
returns number of parents
|
int |
getParent(int iParent)
returns index parent of parent specified by index
|
int[] |
getParents() |
java.lang.String |
getRevision()
Returns the revision string.
|
void |
maxParentSetSize(int nSize)
reserve memory for parent set
|
void |
SetParent(int iParent,
int nNode)
sets index parent of parent specified by index
|
public ParentSet()
public ParentSet(int nMaxNrOfParents)
nMaxNrOfParents
- upper bound on nr of parentspublic ParentSet(ParentSet other)
other
- other parent setpublic int getParent(int iParent)
iParent
- Index of parentpublic int[] getParents()
public void SetParent(int iParent, int nNode)
iParent
- Index of parentnNode
- index of the node that becomes parentpublic int getNrOfParents()
public boolean contains(int iNode)
iNode
- node to test forpublic int getCardinalityOfParents()
public int getFreshCardinalityOfParents(Instances _Instances)
public void maxParentSetSize(int nSize)
nSize
- maximum size of parent set to reserver memory forpublic void addParent(int nParent, Instances _Instances)
nParent
- parent to add_Instances
- used for updating the internalspublic void addParent(int nParent, int iParent, Instances _Instances)
nParent
- parent to addiParent
- location to add parent in parent set_Instances
- used for updating the internalspublic int deleteParent(int nParent, Instances _Instances)
nParent
- node number of the parent to delete_Instances
- data setpublic void deleteLastParent(Instances _Instances)
_Instances
- used for updating the internalspublic void copy(ParentSet other)
other
- : parent set to make a copy frompublic java.lang.String getRevision()
getRevision
in interface RevisionHandler