Class NonNegativeVector

java.lang.Object
  extended byNonNegativeVector

public class NonNegativeVector
extends java.lang.Object

This class implements nonnegative real vectors.


Constructor Summary
NonNegativeVector(int n)
          Creates an n vector with float coordinates.
 
Method Summary
 float scalarProduct(NonNegativeVector y)
          Computes the scalar product of the vector with the vector y.
 NonNegativeVector scale(float r)
          Divides all coordinates of the vector by the factor r.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonNegativeVector

public NonNegativeVector(int n)
Creates an n vector with float coordinates.

Method Detail

scalarProduct

public float scalarProduct(NonNegativeVector y)
Computes the scalar product of the vector with the vector y.


scale

public NonNegativeVector scale(float r)
Divides all coordinates of the vector by the factor r.


toString

public java.lang.String toString()