-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jack Dermody
committed
Aug 3, 2024
1 parent
6f56351
commit 4645449
Showing
17 changed files
with
563 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using BrightData.Types.Graph; | ||
using BrightData.Types; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using FluentAssertions; | ||
using Xunit; | ||
|
||
namespace BrightData.UnitTests | ||
{ | ||
public class SortedArrayTests | ||
{ | ||
[Fact] | ||
public void TestIndexedSortedArray() | ||
{ | ||
var array = new IndexedSortedArray<GraphNodeIndex>(4); | ||
for (var i = 0U; i < 4; i++) | ||
array.Add(new(4-i)); | ||
array.Size.Should().Be(4); | ||
array[0].Index.Should().Be(1); | ||
array[3].Index.Should().Be(4); | ||
array.TryFind(1, out var index).Should().BeTrue(); | ||
index!.Value.Index.Should().Be(1); | ||
} | ||
|
||
[Fact] | ||
public void TestSortedArray() | ||
{ | ||
var array = new SortedArray<uint, float>(4); | ||
for (var i = 0U; i < 4; i++) | ||
array.Add(i, 4-i); | ||
array.Size.Should().Be(4); | ||
array[0].Weight.Should().Be(1); | ||
array[3].Weight.Should().Be(4); | ||
array.TryFind(1, out var value).Should().BeTrue(); | ||
value.Should().Be(3); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 0 additions & 79 deletions
79
BrightData/LinearAlgebra/VectorIndexing/Helper/IndexedFixedSizeGraphNode.cs
This file was deleted.
Oops, something went wrong.
141 changes: 0 additions & 141 deletions
141
BrightData/LinearAlgebra/VectorIndexing/Helper/VectorGraph.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.