Package gprover
Class NdgCs
- java.lang.Object
-
- gprover.NdgCs
-
public class NdgCs extends java.lang.ObjectRepresents a node in a geometric construction tree.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int i, Cons c)Adds a constraint at a specific index.voidadd(Cons c)Adds a constraint to this node.voidaddChild(NdgCs c)Adds a child node to this node.static intcompare(Cons c1, Cons c2)Compares two constraints.intgetCSindex()Gets the index of the last non-null child.intgetMaxCnsInt()Gets the maximum constraint index.intgetNotNullNum()Gets the number of non-null constraints.voidreduce()Reduces the constraints by replacing points.voidreplace(int m, int n)Replaces a point in all constraints.
-
-
-
Constructor Detail
-
NdgCs
public NdgCs()
Constructs an empty NdgCs object.
-
NdgCs
public NdgCs(NdgCs c)
Constructs a NdgCs object by copying another NdgCs object.- Parameters:
c- the NdgCs object to copy
-
-
Method Detail
-
add
public void add(Cons c)
Adds a constraint to this node.- Parameters:
c- the constraint to add
-
getMaxCnsInt
public int getMaxCnsInt()
Gets the maximum constraint index.- Returns:
- the maximum constraint index
-
add
public void add(int i, Cons c)Adds a constraint at a specific index.- Parameters:
i- the indexc- the constraint to add
-
getNotNullNum
public int getNotNullNum()
Gets the number of non-null constraints.- Returns:
- the number of non-null constraints
-
addChild
public void addChild(NdgCs c)
Adds a child node to this node.- Parameters:
c- the child node to add
-
replace
public void replace(int m, int n)Replaces a point in all constraints.- Parameters:
m- the point to replacen- the new point
-
compare
public static int compare(Cons c1, Cons c2)
Compares two constraints.- Parameters:
c1- the first constraintc2- the second constraint- Returns:
- a negative integer, zero, or a positive integer as the first constraint is less than, equal to, or greater than the second
-
reduce
public void reduce()
Reduces the constraints by replacing points.
-
getCSindex
public int getCSindex()
Gets the index of the last non-null child.- Returns:
- the index of the last non-null child
-
-