Versions in this module Expand all Collapse all v1 v1.0.0 Sep 26, 2020 Changes in this version + const CHARSXP + const INTSXP + const REALSXP + const STRSXP + const VECSXP + var ImpossibleMatrix = errors.New("matrix size and underlying data length are not compatible") + var IndexOutOfBounds = errors.New("index is out of bounds (ie too large)") + var InvalidIndex = errors.New("given index is impossible (ie < 0)") + var NotASEXP = errors.New("non-SEXP object provided to a function that needs a SEXP") + var SizeMismatch = errors.New("operation is not possible with given input dimensions") + var TypeMismatch = errors.New("input SEXP type does not match desired output type") + func AreMatricesEqual(A, B Matrix) bool + func AreMatricesEqualTol(A, B Matrix, tolerance float64) bool + type GoSEXP struct + Point unsafe.Pointer + func Float2sexp(in []float64) GoSEXP + func Int2sexp(in []int) GoSEXP + func List2sexp(in List) GoSEXP + func Matrix2sexp(in Matrix) GoSEXP + func NewGoSEXP(in interface{}) (g GoSEXP, err error) + func String2sexp(in []string) GoSEXP + func (g GoSEXP) AsFloats() ([]float64, error) + func (g GoSEXP) AsInts() ([]int, error) + func (g GoSEXP) AsMatrix(nrow, ncol int) (Matrix, error) + func (g GoSEXP) AsStrings() ([]string, error) + type List []GoSEXP + func NewList(s ...GoSEXP) List + type Matrix struct + Data []float64 + Ncol int + Nrow int + func CopyMatrix(in Matrix) (out Matrix) + func CreateIdentity(size int) (*Matrix, error) + func CreateZeros(Nrow, Ncol int) (*Matrix, error) + func MatrixAdd(A, B *Matrix) (C *Matrix, err error) + func MatrixMultiply(A, B *Matrix) (C *Matrix, err error) + func NewMatrix(Nrow, Ncol int, data []float64) (*Matrix, error) + func (m *Matrix) AddConstant(c float64) + func (m *Matrix) AppendCol(data []float64) error + func (m *Matrix) AppendRow(data []float64) error + func (m *Matrix) CreateTranspose() *Matrix + func (m *Matrix) GetCol(ind int) ([]float64, error) + func (m *Matrix) GetInd(row, col int) (float64, error) + func (m *Matrix) GetRow(ind int) ([]float64, error) + func (m *Matrix) MultiplyConstant(c float64) + func (m *Matrix) SetCol(ind int, data []float64) error + func (m *Matrix) SetInd(row, col int, data float64) error + func (m *Matrix) SetRow(ind int, data []float64) error Other modules containing this package github.com/EMurray16/Rgo