File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 ColumnCount = 0
2020 }
2121
22- type CSRMatrix < 'a >( csrTuples : CSRFormat < 'a >) =
22+ type CSRMatrix < 'a when 'a : struct >( csrTuples : CSRFormat < 'a >) =
2323 inherit Matrix< 'a>()
2424
2525 let rowCount = csrTuples.RowPointers.Length - 1
Original file line number Diff line number Diff line change 11namespace GraphBLAS.FSharp
22
3- type DenseVector < 'a >( vector : 'a []) =
3+ type DenseVector < 'a when 'a : struct >( vector : 'a []) =
44 inherit Vector< 'a>()
55
66 new () = DenseVector( Array.zeroCreate< 'a> 0 )
Original file line number Diff line number Diff line change 11namespace GraphBLAS.FSharp
22
33[<AbstractClass>]
4- type Matrix < 'a >() =
4+ type Matrix < 'a when 'a : struct >() =
55 abstract RowCount: int
66 abstract ColumnCount: int
77 abstract Mask: Mask2D
@@ -34,7 +34,7 @@ type Matrix<'a>() =
3434 static member inline (.+) ( x : Matrix < 'a >, y : Matrix < 'a >) = x.EWiseAddInplace y
3535 static member inline (. *) ( x : Matrix < 'a >, y : Matrix < 'a >) = x.EWiseMultInplace y
3636
37- and [<AbstractClass>] Vector < 'a >() =
37+ and [<AbstractClass>] Vector < 'a when 'a : struct >() =
3838 abstract Length: int
3939 abstract Mask: Mask1D
4040 abstract AsArray: 'a []
Original file line number Diff line number Diff line change 11namespace GraphBLAS.FSharp
22
3- type Scalar < 'a > = Scalar of 'a
3+ type Scalar < 'a when 'a : struct > = Scalar of 'a
44with
55 static member op_Implicit ( Scalar source ) = source
You can’t perform that action at this time.
0 commit comments