1 package JSci.maths.vectors; 2 3 import JSci.maths.algebras.Module; 4 5 11 public abstract class MathVector extends Object implements Module.Member { 12 15 protected final int N; 16 20 public MathVector(int n) { 21 N=n; 22 } 23 26 public abstract double norm(); 27 30 public final int dimension() { 31 return N; 32 } 33 37 protected static String getInvalidComponentMsg(int i) { 38 return "("+i+") is an invalid component for this vector."; 39 } 40 } 41 42 | Popular Tags |