Class COptQuestKrigMahalanobisDistance

java.lang.Object
com.opttek.optquest.heatmap.COptQuestKrigMixedDistance
com.opttek.optquest.heatmap.COptQuestKrigMahalanobisDistance
All Implemented Interfaces:
com.opttek.optquest.IKrigDistance

public class COptQuestKrigMahalanobisDistance extends COptQuestKrigMixedDistance
An implementation of KrigDistance that normalized the variables to be on [0,1] and computed the Euclidean distance after normalization. Additionally if we have a lat/lon pair we use a spherical distance computation, and if we have a categorical variable, we use a Hamming distance.
  • Constructor Details

    • COptQuestKrigMahalanobisDistance

      public COptQuestKrigMahalanobisDistance(COptQuestKrigVarInfo varInfo) throws com.opttek.optquest.COptQuestException
      Throws:
      com.opttek.optquest.COptQuestException
  • Method Details

    • getDistance

      public double getDistance(double[] v1, double[] v2)
      return the distance between two multi dimensional vectors in any arbitrary space.
      Specified by:
      getDistance in interface com.opttek.optquest.IKrigDistance
      Overrides:
      getDistance in class COptQuestKrigMixedDistance
      Parameters:
      v1 - - the one of the two vectors we're computing the distance between
      v2 - - the other of the two vectors we're computing the distance between
    • getGradient

      public double[] getGradient(double[] v1, double[] v2, Double distance)
      Specified by:
      getGradient in interface com.opttek.optquest.IKrigDistance
      Overrides:
      getGradient in class COptQuestKrigMixedDistance
    • getCurvature

      public double[][] getCurvature(double[] v1, double[] v2, Double distance)
      Specified by:
      getCurvature in interface com.opttek.optquest.IKrigDistance
      Overrides:
      getCurvature in class COptQuestKrigMixedDistance
    • getProjection

      public com.opttek.optquest.IKrigDistance getProjection(int[] dims) throws com.opttek.optquest.COptQuestException
      Specified by:
      getProjection in interface com.opttek.optquest.IKrigDistance
      Overrides:
      getProjection in class COptQuestKrigMixedDistance
      Throws:
      com.opttek.optquest.COptQuestException
    • updateState

      public void updateState(double[][] space)
      Specified by:
      updateState in interface com.opttek.optquest.IKrigDistance
      Overrides:
      updateState in class COptQuestKrigMixedDistance