Package gprover

Class NdgCs


  • public class NdgCs
    extends java.lang.Object
    Represents a node in a geometric construction tree.
    • Constructor Summary

      Constructors 
      Constructor Description
      NdgCs()
      Constructs an empty NdgCs object.
      NdgCs​(NdgCs c)
      Constructs a NdgCs object by copying another NdgCs object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int i, Cons c)
      Adds a constraint at a specific index.
      void add​(Cons c)
      Adds a constraint to this node.
      void addChild​(NdgCs c)
      Adds a child node to this node.
      static int compare​(Cons c1, Cons c2)
      Compares two constraints.
      int getCSindex()
      Gets the index of the last non-null child.
      int getMaxCnsInt()
      Gets the maximum constraint index.
      int getNotNullNum()
      Gets the number of non-null constraints.
      void reduce()
      Reduces the constraints by replacing points.
      void replace​(int m, int n)
      Replaces a point in all constraints.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 index
        c - 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 replace
        n - the new point
      • compare

        public static int compare​(Cons c1,
                                  Cons c2)
        Compares two constraints.
        Parameters:
        c1 - the first constraint
        c2 - 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