mat: Add DiagView methods to types (#711)

* mat: Add DiagView methods to types

Fixes #213
This commit is contained in:
Brendan Tracey
2018-11-29 16:08:30 +00:00
committed by GitHub
parent 4a8f318905
commit b53e0d9ab0
14 changed files with 280 additions and 2 deletions

View File

@@ -129,6 +129,16 @@ func TestSymAtSet(t *testing.T) {
}
}
func TestSymDiagView(t *testing.T) {
for cas, test := range []*SymDense{
NewSymDense(1, []float64{1}),
NewSymDense(2, []float64{1, 2, 2, 3}),
NewSymDense(3, []float64{1, 2, 3, 2, 4, 5, 3, 5, 6}),
} {
testDiagView(t, cas, test)
}
}
func TestSymAdd(t *testing.T) {
for _, test := range []struct {
n int