Skip to content

Commit b2cc98b

Browse files
committed
roll back to original version of VecN
1 parent 2190a40 commit b2cc98b

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

Algorithms/Search/AStar/VecN.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct VecN(params double[] vals) : IEquatable<VecN>
1414
/// <summary>
1515
/// Gets the dimension count of this vector.
1616
/// </summary>
17-
public readonly int N => data.Length;
17+
public int N => data.Length;
1818

1919
/// <summary>
2020
/// Returns the Length squared.
@@ -108,29 +108,4 @@ public bool Equals(VecN other)
108108

109109
return true;
110110
}
111-
112-
/// <summary>
113-
/// Determines whether the specified object is equal to the current instance.
114-
/// </summary>
115-
/// <param name="obj">The object to compare with the current instance. Can be <see langword="null"/>.</param>
116-
/// <returns><see langword="true"/> if the specified object is a <c>VecN</c> and is equal to the current instance; otherwise <see langword="false"/>.</returns>
117-
public override bool Equals(object? obj)
118-
{
119-
return obj is VecN other && Equals(other);
120-
}
121-
122-
/// <summary>
123-
/// Computes a hash code for the current object based on the values in the <c>data</c> collection.
124-
/// </summary>
125-
/// <returns>An integer representing the hash code for the current object.</returns>
126-
public override int GetHashCode()
127-
{
128-
var hash = default(HashCode);
129-
foreach (var d in data)
130-
{
131-
hash.Add(d);
132-
}
133-
134-
return hash.ToHashCode();
135-
}
136111
}

0 commit comments

Comments
 (0)