Skip to content

Commit e53a0a9

Browse files
committed
Implement members plug for dense vector
1 parent 81e2894 commit e53a0a9

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/GraphBLAS-sharp/CSRMatrix.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ type CSRMatrix<'a>(csrTuples: CSRFormat<'a>) =
110110

111111
override this.EWiseAddInplace a b c = ()
112112
override this.EWiseMultInplace a b c = ()
113-
override this.ApplyInplace<'b> a (b: UnaryOp<'a, 'b>) = ()
113+
override this.ApplyInplace a b = ()

src/GraphBLAS-sharp/DenseVector.fs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,24 @@ type DenseVector<'a>(vector: 'a[]) =
77

88
override this.Length = Array.length vector
99
override this.AsArray = vector
10+
override this.Indices = []
1011

12+
override this.Item
13+
with get (mask: Mask1D option) : Vector<'a> = upcast DenseVector<'a>()
14+
and set (mask: Mask1D option) (value: Vector<'a>) = ()
15+
override this.Item
16+
with get (rowIdx: int, colIdx: int) : Scalar<'a> = Scalar Unchecked.defaultof<'a>
17+
and set (rowIdx: int, colIdx: int) (value: Scalar<'a>) = ()
18+
19+
override this.Item
20+
with set (mask: Mask1D option) (value: Scalar<'a>) = ()
21+
22+
override this.Vxm a b c = upcast DenseVector<'a>()
23+
override this.EWiseAdd a b c = upcast DenseVector<'a>()
24+
override this.EWiseMult a b c = upcast DenseVector<'a>()
25+
override this.Apply<'b> a b = upcast DenseVector<'b>()
26+
override this.Reduce a = Scalar Unchecked.defaultof<'a>
27+
28+
override this.EWiseAddInplace a b c = ()
29+
override this.EWiseMultInplace a b c = ()
30+
override this.ApplyInplace a b = ()

0 commit comments

Comments
 (0)