Package elki.math

Class SinCosTable.HalfTable

  • Enclosing class:
    SinCosTable

    private static class SinCosTable.HalfTable
    extends SinCosTable
    Table that exploits just one symmetry, as the number of steps is divisible by two.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double[] costable
      Data store
      private int halfsteps
      Number of steps div 2
      private double[] sintable
      Data store
    • Constructor Summary

      Constructors 
      Constructor Description
      HalfTable​(int steps)
      Constructor for tables with
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double cos​(int step)
      Get Cosine by step value.
      double sin​(int step)
      Get Sinus by step value.
      • Methods inherited from class java.lang.Object

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

      • halfsteps

        private final int halfsteps
        Number of steps div 2
      • costable

        private final double[] costable
        Data store
      • sintable

        private final double[] sintable
        Data store
    • Constructor Detail

      • HalfTable

        public HalfTable​(int steps)
        Constructor for tables with
        Parameters:
        steps -
    • Method Detail

      • cos

        public double cos​(int step)
        Get Cosine by step value.
        Specified by:
        cos in class SinCosTable
        Parameters:
        step - Step value
        Returns:
        Cosinus
      • sin

        public double sin​(int step)
        Get Sinus by step value.
        Specified by:
        sin in class SinCosTable
        Parameters:
        step - Step value
        Returns:
        Sinus