Interface IIntegrityCheck

  • All Known Implementing Classes:
    IntegrityCheck

    public interface IIntegrityCheck
    Defines methods to be used for checking the correctness of code for Incremental TIN implementations.
    • Method Detail

      • getMessage

        String getMessage()
        Gets descriptive information about the cause of a test failure.
        Returns:
        if a failure occurred, descriptive information; otherwise a string indicating that No Error Detected.
      • inspect

        boolean inspect()
        Performs an inspection of the TIN checking for conditions that violate the construction rules.

        The Rules

        • Ensure that every edge links to two valid triangular circuits (one on each side).
        • Ensure that the set of ghost triangles forms a closed loop around the convex hull (perimeter) of the TIN
        • Ensure that all ghost triangles are included in the perimeter loop
        • Ensure that no triangles are degenerate (negative or zero area)
        • Ensure that all triangle pairs are Delaunay or close-to-Delaunay optimal
        Returns:
        true if the TIN passes inspection; otherwise, false.
      • printSummary

        void printSummary​(PrintStream ps)
        Prints a summary of data collected during inspection of a TIN.
        Parameters:
        ps - a print stream to receive the output.
      • testGetVerticesAgainstInputList

        boolean testGetVerticesAgainstInputList​(List<Vertex> inputList)
        Compares the list of vertices from the getVertices() method to the original list of input vertices and determines whether they are consistent. The getVertices method must return one, and only one, instance of each vertex in the input list.

        This method does not account for cases where constraints have been added to the TIN. If constraints have been added, it will return a value of false.

        Important: The test assumes that each vertex in the input set is unique. If a vertex occurs more than once, the test will fail.

        Parameters:
        inputList - the list of vertices input into the TIN.
        Returns:
        true if the test passes; otherwise false
      • getConstrainedViolationCount

        int getConstrainedViolationCount()
        Gets the number of constrained edges that would violate the Delaunay criterion
        Returns:
        a positive integer.
      • getConstrainedViolationMaximum

        double getConstrainedViolationMaximum()
        Get the maximum calculated in-circle score for constrained edges that violate the Delaunay criterion
        Returns:
        a positive number, or zero if no violations occurred.
      • getContrainedViolationAverage

        double getContrainedViolationAverage()
        Get the average calculated in-circle score for constrained edges that violate the Delaunay criterion
        Returns:
        a positive number, or zero if no violations occurred.