Package gprover

Class CNdg


  • public class CNdg
    extends java.lang.Object
    The CNdg class represents a geometric non-degenerate condition. It includes properties for dependent constructions, equivalent conditions, existence flag, type, number, points, and a string description.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.Object dep
      The dependent construction.
      java.lang.Object equ
      The equivalent conditions.
      boolean exists
      The existence flag.
      static int MAX_GEO
      The maximum number of geometric objects.
      int no
      The number of points.
      int[] p
      The array of points.
      int type
      The type of the geometric condition.
    • Constructor Summary

      Constructors 
      Constructor Description
      CNdg()
      Constructs a CNdg object with default values.
      CNdg​(CNdg c1)
      Constructs a CNdg object by copying another CNdg object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAllPt​(int[] p1)
      Adds all points from the specified array to the condition.
      void addAPt​(int pt)
      Adds a point to the condition.
      boolean contain​(int pt)
      Checks if the condition contains the specified point.
      boolean contain2​(int a, int b)
      Checks if the condition contains the specified points.
      int getMaxInt()
      Gets the maximum integer value from the points array.
      int getRedundentPt()
      Gets the redundant point in the condition.
      boolean redundentPt()
      Checks if there are redundant points in the condition.
      java.lang.String toString()
      Returns a string representation of the geometric condition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • MAX_GEO

        public static final int MAX_GEO
        The maximum number of geometric objects.
        See Also:
        Constant Field Values
      • dep

        public java.lang.Object dep
        The dependent construction.
      • equ

        public java.lang.Object equ
        The equivalent conditions.
      • exists

        public boolean exists
        The existence flag.
      • type

        public int type
        The type of the geometric condition.
      • no

        public int no
        The number of points.
      • p

        public int[] p
        The array of points.
    • Constructor Detail

      • CNdg

        public CNdg()
        Constructs a CNdg object with default values.
      • CNdg

        public CNdg​(CNdg c1)
        Constructs a CNdg object by copying another CNdg object.
        Parameters:
        c1 - the CNdg object to copy
    • Method Detail

      • getMaxInt

        public int getMaxInt()
        Gets the maximum integer value from the points array.
        Returns:
        the maximum integer value from the points array
      • toString

        public java.lang.String toString()
        Returns a string representation of the geometric condition.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string description of the geometric condition
      • contain2

        public boolean contain2​(int a,
                                int b)
        Checks if the condition contains the specified points.
        Parameters:
        a - the first point
        b - the second point
        Returns:
        true if the condition contains the specified points, false otherwise
      • contain

        public boolean contain​(int pt)
        Checks if the condition contains the specified point.
        Parameters:
        pt - the point to check
        Returns:
        true if the condition contains the specified point, false otherwise
      • redundentPt

        public boolean redundentPt()
        Checks if there are redundant points in the condition.
        Returns:
        true if there are redundant points, false otherwise
      • addAPt

        public void addAPt​(int pt)
        Adds a point to the condition.
        Parameters:
        pt - the point to add
      • addAllPt

        public void addAllPt​(int[] p1)
        Adds all points from the specified array to the condition.
        Parameters:
        p1 - the array of points to add
      • getRedundentPt

        public int getRedundentPt()
        Gets the redundant point in the condition.
        Returns:
        the redundant point, or 0 if there are no redundant points