Skip to content

Commit c83259a

Browse files
committed
refactor: NNZCount -> NNZ
1 parent 106e52a commit c83259a

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/GraphBLAS-sharp/Objects/Matrix.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ type Matrix<'a when 'a: struct> =
152152
| COO matrix -> matrix.ColumnCount
153153
| CSC matrix -> matrix.ColumnCount
154154

155-
member this.NNZCount =
155+
member this.NNZ =
156156
match this with
157157
| COO m -> m.Values.Length
158158
| CSR m -> m.Values.Length

tests/GraphBLAS-sharp.Tests/Matrix/Convert.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let makeTest context q formatFrom formatTo convertFun isZero (array: 'a [,]) =
2121
let mtx =
2222
createMatrixFromArray2D formatFrom array isZero
2323

24-
if mtx.NNZCount > 0 then
24+
if mtx.NNZ > 0 then
2525
let actual =
2626
let mBefore = mtx.ToDevice context
2727
let mAfter: ClMatrix<'a> = convertFun q HostInterop mBefore

tests/GraphBLAS-sharp.Tests/Matrix/Map2.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ let correctnessGenericTest
6464
let mtx2 =
6565
createMatrixFromArray2D case.Format rightMatrix (isEqual zero)
6666

67-
if mtx1.NNZCount > 0 && mtx2.NNZCount > 0 then
67+
if mtx1.NNZ > 0 && mtx2.NNZ > 0 then
6868
try
6969
let m1 = mtx1.ToDevice case.TestContext.ClContext
7070

tests/GraphBLAS-sharp.Tests/Matrix/Mxm.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let makeTest context q zero isEqual plus mul mxmFun (leftMatrix: 'a [,], rightMa
2424
let m2 =
2525
createMatrixFromArray2D CSC rightMatrix (isEqual zero)
2626

27-
if m1.NNZCount > 0 && m2.NNZCount > 0 then
27+
if m1.NNZ > 0 && m2.NNZ > 0 then
2828
let expected =
2929
Array2D.init
3030
<| Array2D.length1 mask
@@ -40,7 +40,7 @@ let makeTest context q zero isEqual plus mul mxmFun (leftMatrix: 'a [,], rightMa
4040
let expected =
4141
createMatrixFromArray2D COO expected (isEqual zero)
4242

43-
if expected.NNZCount > 0 then
43+
if expected.NNZ > 0 then
4444
let m1 = m1.ToDevice context
4545
let m2 = m2.ToDevice context
4646

tests/GraphBLAS-sharp.Tests/Matrix/Transpose.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let makeTestRegular context q transposeFun areEqual zero case (array: 'a [,]) =
7878
let mtx =
7979
createMatrixFromArray2D case.Format array (areEqual zero)
8080

81-
if mtx.NNZCount > 0 then
81+
if mtx.NNZ > 0 then
8282
let actual =
8383
let m = mtx.ToDevice context
8484
let (mT: ClMatrix<'a>) = transposeFun q HostInterop m
@@ -105,7 +105,7 @@ let makeTestTwiceTranspose context q transposeFun areEqual zero case (array: 'a
105105
let mtx =
106106
createMatrixFromArray2D case.Format array (areEqual zero)
107107

108-
if mtx.NNZCount > 0 then
108+
if mtx.NNZ > 0 then
109109
let actual =
110110
let m = mtx.ToDevice context
111111
let mT = transposeFun q HostInterop m

tests/GraphBLAS-sharp.Tests/Vector/SpMV.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ let correctnessGenericTest
6161
let vtr =
6262
createVectorFromArray Dense vector (isEqual zero)
6363

64-
if mtx.NNZCount > 0 && vtr.Size > 0 then
64+
if mtx.NNZ > 0 && vtr.Size > 0 then
6565
try
6666
let m = mtx.ToDevice testContext.ClContext
6767

0 commit comments

Comments
 (0)