Documentation
¶
Overview ¶
Package "dense" provides an implementation of mutable dense matrix.
Index ¶
- Constants
- func Deserialize(reader io.Reader) (types.Matrix, error)
- func New(rows, columns int) func(elements ...float64) *Matrix
- type Matrix
- func (m *Matrix) Add(n types.Matrix) types.Matrix
- func (m *Matrix) All() types.Cursor
- func (m *Matrix) Base() types.Matrix
- func (m *Matrix) Column(column int) types.Matrix
- func (m *Matrix) Columns() (columns int)
- func (m *Matrix) Diagonal() types.Cursor
- func (m *Matrix) Equal(n types.Matrix) bool
- func (m *Matrix) Get(row, column int) (element float64)
- func (m *Matrix) MarshalJSON() ([]byte, error)
- func (m *Matrix) Max() (element float64, row, column int)
- func (m *Matrix) Min() (element float64, row, column int)
- func (m *Matrix) Multiply(n types.Matrix) types.Matrix
- func (m *Matrix) NonZeros() types.Cursor
- func (m *Matrix) Row(row int) types.Matrix
- func (m *Matrix) Rows() (rows int)
- func (m *Matrix) Scalar(s float64) types.Matrix
- func (m *Matrix) Serialize(writer io.Writer) error
- func (m *Matrix) Shape() (rows, columns int)
- func (m *Matrix) Subtract(n types.Matrix) types.Matrix
- func (m *Matrix) Transpose() types.Matrix
- func (m *Matrix) UnmarshalJSON(b []byte) error
- func (m *Matrix) Update(row, column int, element float64) types.Matrix
- func (m *Matrix) View(row, column, rows, columns int) types.Matrix
Constants ¶
View Source
const ( AlreadyInitializedError = "AlreadyInitializedError" IncompatibleVersionError = "IncompatibleVersion" )
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶ added in v0.1.1
Deserialize a matrix from the given reader.
Types ¶
type Matrix ¶ added in v0.1.5
type Matrix struct {
// contains filtered or unexported fields
}
func Convert ¶ added in v0.1.5
Convert the given matrix to *dense.Matrix. If the given matrix is already typed as *dense.Matrix, just returns it. In other cases, create a new matrix.
func Zeros ¶
Create a new zero matrix. When "rows" and "columns" is not positive, validates.NON_POSITIVE_SIZE_PANIC will be caused.
func (*Matrix) MarshalJSON ¶ added in v0.1.5
func (*Matrix) UnmarshalJSON ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.