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 Summary
Modifier and TypeMethodDescriptionReturn the vector difference (v-u), where u is the current vectorintReturn the dimension of the spaceReturn a new vector obtained by scalar divisiongetCartesian(int i) return the i-th cartesian coordinate of the pointReturn the inner product of two vectorsReturn a new vector obtained by multiplying by a scalaropposite()Return the opposite of the current vectorvoidsetCartesian(int i, Number x) set the i-th cartesian coordinateReturn the square length of a vectorReturn the vector sum (v+u), where u is the current vectortoString()Return a String representing vector coordinates
-
Method Details
-
getCartesian
return the i-th cartesian coordinate of the point -
setCartesian
set the i-th cartesian coordinate -
sum
-
difference
-
opposite
Vector_ opposite()Return the opposite of the current vector -
innerProduct
-
divisionByScalar
-
multiplyByScalar
-
squaredLength
Number squaredLength()Return the square length of a vector -
dimension
int dimension()Return the dimension of the space -
toString
-