commandline.Encoder.dynamicProg
Class Node

java.lang.Object
  extended by commandline.Encoder.dynamicProg.Node

public class Node
extends java.lang.Object

Class representing a TreeNode containing a GeometricObject and defining parent/child relations

Author:
ward

Field Summary
 float cost
           
 
Constructor Summary
Node(GeometricObject geometricObject, int level)
           
 
Method Summary
 void addChildNode(Node child)
           
 void addChildNodes(java.util.ArrayList<Node> children)
           
 void addParentNode(Node parent)
           
 java.util.ArrayList<Node> getAllLeaveNodes()
           
 float getBitBudget()
          returns R from L=D+lambda R
 Node getChildCoupledtoGeomObj(GeometricObject geometricObject)
          Looks up the child coupled to a certain geometricObject
 java.util.ArrayList<Node> getChildren()
           
 float getCost(float Lagrangian, int WHICH_NORM)
          Gets the Lagrangian cost of this node: min(L = D+ \lambda*R,previously setCost
 GeometricObject getGeometricObject()
           
 int getLevel()
           
 Node getParent()
           
 boolean hasChildren()
          Returns whether the Geometric Object has children or not
 boolean hasParent()
           
 boolean isPruned()
           
 void setCost(float cost)
          sets this.cost= min(previous_cost,cost)
 void setHasBeenVisited(boolean hasBeenVisited)
           
 void setPruned(boolean isPruned)
          Sets if the children should be considered or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cost

public float cost
Constructor Detail

Node

public Node(GeometricObject geometricObject,
            int level)
Method Detail

addChildNode

public void addChildNode(Node child)

addChildNodes

public void addChildNodes(java.util.ArrayList<Node> children)

addParentNode

public void addParentNode(Node parent)

getParent

public Node getParent()

hasParent

public boolean hasParent()

hasChildren

public boolean hasChildren()
Returns whether the Geometric Object has children or not

Returns:

getChildren

public java.util.ArrayList<Node> getChildren()

getChildCoupledtoGeomObj

public Node getChildCoupledtoGeomObj(GeometricObject geometricObject)
Looks up the child coupled to a certain geometricObject

Parameters:
geometricObject -
Returns:
the child || null if not found

getGeometricObject

public GeometricObject getGeometricObject()

isPruned

public boolean isPruned()
Returns:
wether the childNodes should be considered or not

setPruned

public void setPruned(boolean isPruned)
Sets if the children should be considered or not

Parameters:
isPruned -

getCost

public float getCost(float Lagrangian,
                     int WHICH_NORM)
Gets the Lagrangian cost of this node: min(L = D+ \lambda*R,previously setCost

Returns:

setCost

public void setCost(float cost)
sets this.cost= min(previous_cost,cost)

Parameters:
cost -

getLevel

public int getLevel()

getBitBudget

public float getBitBudget()
returns R from L=D+lambda R

Returns:

getAllLeaveNodes

public java.util.ArrayList<Node> getAllLeaveNodes()

setHasBeenVisited

public void setHasBeenVisited(boolean hasBeenVisited)