Class GraphElement

java.lang.Object
com.github.gbenroscience.math.graph.GraphElement

public class GraphElement extends Object
Created by JIBOYE Oluwagbemiro Olaoluwa on 6/28/2016.
  • Constructor Details

    • GraphElement

      public GraphElement(String function, GraphType graphType)
  • Method Details

    • getFunctionName

      public String getFunctionName()
    • setFunctionName

      public void setFunctionName(String functionName)
    • setGraphType

      public void setGraphType(GraphType graphType)
    • getGraphType

      public GraphType getGraphType()
    • setFunction

      public void setFunction(String function)
    • getFunction

      public String getFunction()
    • getHorizontalCoordinates

      public double[] getHorizontalCoordinates()
    • setHorizontalCoordinates

      public void setHorizontalCoordinates(double[] horizontalCoordinates)
    • setVerticalCoordinates

      public void setVerticalCoordinates(double[] verticalCoordinates)
    • getVerticalCoordinates

      public double[] getVerticalCoordinates()
    • fillCoords

      public void fillCoords(double xLower, double xUpper, double xStep, double yStep, int drg, boolean useTurbo)
    • binarySearch

      public static int binarySearch(double searchValue, double[] array)
      Parameters:
      searchValue - The item whose index we are trying to estimate.
      array - The array to conduct binarySearch on
      Returns:
      the index in the array where this item would be best placed. This index is such that any element to its left would be less than searchValue and any element to its right or at index would be greater than or equal to it.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • main

      public static void main(String[] args)