Ignore:
Timestamp:
06/29/17 23:04:03 (2 years ago)
Author:
abeham
Message:

#2797:

  • Added SPSO 2007 and SPSO 2011 particle updaters
  • Unhide particle updater parameter
  • Changed default parameters of sample
  • Changed max velocity to very high value by default (no speed limit)
  • Adapted unit test
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs

    r15091 r15096  
    7878    }
    7979
     80    public void Add(RealVector other) {
     81      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
     82      for (var i = 0; i < Length; i++)
     83        this[i] += other[i];
     84    }
     85
     86    public void Subtract(RealVector other) {
     87      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
     88      for (var i = 0; i < Length; i++)
     89        this[i] -= other[i];
     90    }
     91
    8092    public double DotProduct(RealVector other) {
    8193      if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length.");
Note: See TracChangeset for help on using the changeset viewer.