MCPcopy
hub / github.com/arnauddri/algorithms / MakeMatrix

Function MakeMatrix

data-structures/matrix/matrix.go:34–42  ·  view source on GitHub ↗
(Elements []float64, rows, cols int)

Source from the content-addressed store, hash-verified

32}
33
34func MakeMatrix(Elements []float64, rows, cols int) *Matrix {
35 A := new(Matrix)
36 A.rows = rows
37 A.cols = cols
38 A.step = cols
39 A.Elements = Elements
40
41 return A
42}
43func (A *Matrix) CountRows() int {
44 return A.rows
45}

Callers 11

AddFunction · 0.85
SubstractFunction · 0.85
MultiplyFunction · 0.85
TestMakeMatrixFunction · 0.85
TestCountFunction · 0.85
TestGetElmFunction · 0.85
TestSetElmFunction · 0.85
TestTraceFunction · 0.85
TestAddFunction · 0.85
TestSubstractFunction · 0.85
TestScaleFunction · 0.85

Calls

no outgoing calls

Tested by 8

TestMakeMatrixFunction · 0.68
TestCountFunction · 0.68
TestGetElmFunction · 0.68
TestSetElmFunction · 0.68
TestTraceFunction · 0.68
TestAddFunction · 0.68
TestSubstractFunction · 0.68
TestScaleFunction · 0.68