- Timestamp:
- 06/29/17 15:26:16 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs
r14185 r15091 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 77 78 } 78 79 80 public double DotProduct(RealVector other) { 81 if (other.Length != Length) throw new ArgumentException("Vectors are of unequal length."); 82 var dotProd = 0.0; 83 for (var i = 0; i < Length; i++) 84 dotProd += this[i] * other[i]; 85 return dotProd; 86 } 79 87 } 80 88 }
Note: See TracChangeset
for help on using the changeset viewer.