Interface Vector_

All Known Implementing Classes:
GridVector_2, Vector_2, Vector_3

public interface Vector_
An interface defining primivites and operations on vectors in euclidean space
Author:
Luca Castelli Aleardi (Ecole Polytechnique, 2010)
  • Method Details

    • getCartesian

      Number getCartesian(int i)
      return the i-th cartesian coordinate of the point
    • setCartesian

      void setCartesian(int i, Number x)
      set the i-th cartesian coordinate
    • sum

      Vector_ sum(Vector_ v)
      Return the vector sum (v+u), where u is the current vector
    • difference

      Vector_ difference(Vector_ v)
      Return the vector difference (v-u), where u is the current vector
    • opposite

      Vector_ opposite()
      Return the opposite of the current vector
    • innerProduct

      Number innerProduct(Vector_ v)
      Return the inner product of two vectors
    • divisionByScalar

      Vector_ divisionByScalar(Number s)
      Return a new vector obtained by scalar division
    • multiplyByScalar

      Vector_ multiplyByScalar(Number s)
      Return a new vector obtained by multiplying by a scalar
    • squaredLength

      Number squaredLength()
      Return the square length of a vector
    • dimension

      int dimension()
      Return the dimension of the space
    • toString

      String toString()
      Return a String representing vector coordinates
      Overrides:
      toString in class Object