Beispiel #1
0
 public sealed override bool EqualsTo(VectorObject <double> that)
 {
     string[] keys_1 = this.Keys.ToArray();
     string[] keys_2 = that.Keys.ToArray();
     if (!(keys_1.All(k => keys_2.Contains(k)) && keys_2.All(k => keys_1.Contains(k))))
     {
         throw new VectorExceptions.DifferentKeysException(keys_1, keys_2);
     }
     else
     {
         return(keys_1.All(k => this[k] == that[k]));
     }
 }
Beispiel #2
0
 public sealed override VectorObject <double> SubtractImputeMissingKeys(VectorObject <double> that) =>
 new RealVector(this.ElementWiseOpImputeMissingKeys(that, (x, y) => x - y, defaultValue: 0.0));
Beispiel #3
0
 public sealed override VectorObject <double> Subtract(VectorObject <double> that) =>
 new RealVector(this.ElementWiseOp(that, (x, y) => x - y));
Beispiel #4
0
 public sealed override VectorObject <double> MultiplyImputeMissingKeys(VectorObject <double> that) =>
 new RealVector(this.ElementWiseOpImputeMissingKeys(that, (x, y) => x * y, defaultValue: 1.0));
Beispiel #5
0
 public sealed override VectorObject <double> Multiply(VectorObject <double> that) =>
 new RealVector(this.ElementWiseOp(that, (x, y) => x * y));
Beispiel #6
0
 public sealed override VectorObject <double> Add(VectorObject <double> that) =>
 new RealVector(this.ElementWiseOp(that, (x, y) => x + y));
Beispiel #7
0
 public sealed override VectorObject <Interval> Subtract(VectorObject <Interval> that) =>
 new IntervalVector(this.ElementWiseOp(that, (x, y) => x - y));
Beispiel #8
0
 public sealed override VectorObject <Interval> Multiply(VectorObject <Interval> that) =>
 new IntervalVector(this.ElementWiseOp(that, (x, y) => x * y));
Beispiel #9
0
 public sealed override VectorObject <Interval> AddImputeMissingKeys(VectorObject <Interval> that) =>
 new IntervalVector(this.ElementWiseOpImputeMissingKeys(that, (x, y) => x + y, defaultValue: 0.0));