marf.Classification.Distance
Class ChebyshevDistance

java.lang.Object
  extended bymarf.Storage.StorageManager
      extended bymarf.Classification.Classification
          extended bymarf.Classification.Distance.Distance
              extended bymarf.Classification.Distance.ChebyshevDistance
All Implemented Interfaces:
java.lang.Cloneable, IClassification, IStorageManager, java.io.Serializable

public class ChebyshevDistance
extends Distance

Chebyshev Distance Classifier.

Also known as Manhattan or City Block distance.

$Id: ChebyshevDistance.java,v 1.17 2005/08/11 00:44:50 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.17 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.Classification.Classification
oFeatureExtraction, oResultSet, oTrainingSet
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Classification.IClassification
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
ChebyshevDistance(IFeatureExtraction poFeatureExtraction)
          ChebyshevDistance Constructor.
 
Method Summary
 double distance(double[] padVector1, double[] padVector2)
          Chebyshev Distance implementation.
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.Classification.Distance.Distance
classify, getResult
 
Methods inherited from class marf.Classification.Classification
clone, dump, getFeatureExtraction, getResultSet, getTrainingSetFilename, restore, setFeatureExtraction, train
 
Methods inherited from class marf.Storage.StorageManager
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, hashCode, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChebyshevDistance

public ChebyshevDistance(IFeatureExtraction poFeatureExtraction)
ChebyshevDistance Constructor.

Parameters:
poFeatureExtraction - FeatureExtraction module reference
Method Detail

distance

public final double distance(double[] padVector1,
                             double[] padVector2)
Chebyshev Distance implementation.

Specified by:
distance in class Distance
Parameters:
padVector1 - first vector to compare
padVector2 - second vector to compare
Returns:
Chebyshev (a.k.a city-block/Manhattan) distance between two feature vectors

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo