public Vektor Multiplizieren(double a) { Vektor ergebnis = new Vektor(this); for (int i = 0; i < this.wert.Length; i++) { ergebnis[i] = this.wert[i] * a; } return(ergebnis); }
public Vektor Subtrahieren(Vektor v) { if (v.wert.Length != this.wert.Length) { throw new RankException(); } Vektor ergebnis = new Vektor(v); for (int i = 0; i < this.wert.Length; i++) { ergebnis[i] = this.wert[i] - v.wert[i]; } return(ergebnis); }
public double Multiplizieren(Vektor v) { if (v.wert.Length != this.wert.Length) { throw new RankException(); } double ergebnis = 0; for (int i = 0; i < this.wert.Length; i++) { ergebnis += this.wert[i] * v.wert[i]; } return(ergebnis); }
public Vektor(Vektor v) { this.wert = v.wert; }