fr.lip6.type
Class ByteVector

java.lang.Object
  extended by fr.lip6.type.MLVector<byte[]>
      extended by fr.lip6.type.ByteVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ByteVector
extends MLVector<byte[]>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class fr.lip6.type.MLVector
eps, length, values
 
Constructor Summary
ByteVector()
           
ByteVector(byte[] f)
           
 
Method Summary
 MLVector<byte[]> add(MLVector<byte[]> lv)
          addition of vectors
 double distChi1(MLVector<byte[]> lv)
          chi² distance with abs() instead of pow()
 double distChi2(MLVector<byte[]> lv)
          Chi² distance between vectors.
 double distL2(MLVector<byte[]> lv)
          L2 distance between the vectors.
 double dot(MLVector<byte[]> lvector)
          return dot product (scalar product)
 MLVector<byte[]> mult(double d)
          multiplicaton par un scalaire.
 MLVector<byte[]> mult(MLVector<byte[]> lv)
          multiplication membre à membre
 MLVector<byte[]> Normalize()
          return a Vector colinear to this with norm 1
 MLVector<byte[]> NormalizeLocal()
          set the norm of this vector to 1
 MLVector<byte[]> zero()
          return zero of the input space
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteVector

public ByteVector()

ByteVector

public ByteVector(byte[] f)
Method Detail

add

public MLVector<byte[]> add(MLVector<byte[]> lv)
Description copied from class: MLVector
addition of vectors

Specified by:
add in class MLVector<byte[]>
Returns:
a new MLVector that is the addition of this MLVector and lvector

dot

public double dot(MLVector<byte[]> lvector)
Description copied from class: MLVector
return dot product (scalar product)

Specified by:
dot in class MLVector<byte[]>
Returns:
dot product between this MLVector and lvector

distChi2

public double distChi2(MLVector<byte[]> lv)
Description copied from class: MLVector
Chi² distance between vectors.

Specified by:
distChi2 in class MLVector<byte[]>
Returns:
Chi² distance between this MLVector and lv

distL2

public double distL2(MLVector<byte[]> lv)
Description copied from class: MLVector
L2 distance between the vectors.

Specified by:
distL2 in class MLVector<byte[]>
Returns:
L2 distance between this MLVector and lv

distChi1

public double distChi1(MLVector<byte[]> lv)
Description copied from class: MLVector
chi² distance with abs() instead of pow()

Specified by:
distChi1 in class MLVector<byte[]>
Returns:
Chi^1 distance between this MLVector and lv

mult

public MLVector<byte[]> mult(MLVector<byte[]> lv)
Description copied from class: MLVector
multiplication membre à membre

Specified by:
mult in class MLVector<byte[]>
Returns:
a new MLVector that is a member to member product of composants from this MLVector and lv

mult

public MLVector<byte[]> mult(double d)
Description copied from class: MLVector
multiplicaton par un scalaire.

Specified by:
mult in class MLVector<byte[]>

zero

public MLVector<byte[]> zero()
Description copied from class: MLVector
return zero of the input space

Specified by:
zero in class MLVector<byte[]>
Returns:
return zero representation in input space

Normalize

public MLVector<byte[]> Normalize()
Description copied from class: MLVector
return a Vector colinear to this with norm 1

Specified by:
Normalize in class MLVector<byte[]>

NormalizeLocal

public MLVector<byte[]> NormalizeLocal()
Description copied from class: MLVector
set the norm of this vector to 1

Specified by:
NormalizeLocal in class MLVector<byte[]>