/******************************************** Hilfsklasse fr Vektoren Implementiert Methoden zur Addition, Multiplikation, Inversion von Vektoren und parsen eines Strings sowie Ausgabe mit Hilfe eines Strings ********************************************/ public class Vertex { int dim; //Dimensions in dem Beispiel 3 protected double c[]; //components Vertex(Vertex v) { dim=v.dim; c=new double [dim]; for(int n=0;n=1"); this.dim=dim; c=new double [dim]; for(int n=0;n=dim)throw new VertexException("invalid dimension"); return c[n]; } public void setComp(int n,double val) throws VertexException { if(n>=dim)throw new VertexException("invalid dimension"); c[n]=val; } public void invert() { for(int n=0;n