Documentation ¶
Index ¶
- Constants
- Variables
- func ArraysTo2Vector(r1, r2 []float64, scaleO ...float64) (g [][2]float64)
- func ArraysToPoints(r1, r2 []float64) (points []graphics2D.Point)
- func ColMajorIndex(nc, i, j int) (ind int)
- func ConstArray(N int, val float64) (v []float64)
- func GetColor(name ColorName) (c color.RGBA)
- func GetMemUsage() string
- func IndexedAssign(mI interface{}, I Index, ValI interface{}) (err error)
- func NewSymTriDiagonal(d0, d1 []float64) (Tri *mat.SymDense)
- func POW(x float64, pp int) (y float64)
- func ParseDim(dimI interface{}, max int) (i1, i2 int)
- func RowMajorToColMajor(nr, nc, ind int) (cind int)
- func SleepFor(milliseconds int)
- func Split1D(iMax, numThreads, threadNum int) (istart, iend int)
- func Split1DMaxChunk(iMax, numThreads int) (maxChunk int)
- type BlockMatrix
- func (bm BlockMatrix) Add(ba BlockMatrix)
- func (bm BlockMatrix) Copy() (R BlockMatrix)
- func (bm BlockMatrix) GetTol() (tol float64)
- func (bm BlockMatrix) IsSquare() bool
- func (bm *BlockMatrix) LUPDecompose() (err error)
- func (bm BlockMatrix) LUPDeterminant() (det float64, err error)
- func (bm BlockMatrix) LUPInvert() (R BlockMatrix, err error)
- func (bm BlockMatrix) LUPSolve(b []Matrix) (Bx BlockMatrix, err error)
- func (bm BlockMatrix) Mul(ba BlockMatrix) (R BlockMatrix)
- func (bm BlockMatrix) Print() (out string)
- func (bm BlockMatrix) Scale(val float64) (R BlockMatrix)
- func (bm BlockMatrix) Transpose() (R BlockMatrix)
- type CSR
- func (m CSR) Assign(I Index, AI interface{}) CSR
- func (m CSR) At(i, j int) float64
- func (m CSR) Data() []float64
- func (m CSR) Dims() (r, c int)
- func (m CSR) Equate(ValuesI interface{}, RangeO ...interface{})
- func (m CSR) IndexedAssign(I Index, ValI interface{}) (err error)
- func (m CSR) RawMatrix() *blas.SparseMatrix
- func (m CSR) T() mat.Matrix
- type ColorName
- type DOK
- func (m DOK) Assign(I Index, AI interface{}) DOK
- func (m DOK) At(i, j int) float64
- func (m DOK) Data() []float64
- func (m DOK) Dims() (r, c int)
- func (m DOK) Equate(ValuesI interface{}, RangeO ...interface{})
- func (m DOK) IndexedAssign(I Index, ValI interface{}) (err error)
- func (m DOK) RawMatrix() *blas.SparseMatrix
- func (m DOK) T() mat.Matrix
- func (m DOK) ToCSR() CSR
- type EvalOp
- type Index
- func (I Index) Add(val int) Index
- func (I Index) Apply(f func(val int) int) Index
- func (I Index) Compare(op EvalOp, Values Index) (J Index)
- func (I Index) Copy() (r Index)
- func (I *Index) IndexedAssign(J, Val Index) (err error)
- func (I Index) Outer(J Index) (A Matrix)
- func (I Index) RowMajorToColumnMajor(nr, nc int) Index
- func (I Index) Subset(J Index) (r Index)
- func (I Index) ToMatrix(nr, nc int) (R Matrix)
- func (I Index) ToMatrixReversed(nr, nc int) (R Matrix)
- type Index2D
- type LineChart
- type Matrix
- func (m Matrix) Add(A Matrix, RO ...Matrix) Matrix
- func (m Matrix) AddScalar(a float64) Matrix
- func (m Matrix) Apply(f func(float64) float64) Matrix
- func (m Matrix) Apply2(A Matrix, f func(float64, float64) float64) Matrix
- func (m Matrix) Apply3(A, B Matrix, f func(float64, float64, float64) float64) Matrix
- func (m Matrix) Apply3Parallel(A, B Matrix, f func(float64, float64, float64) float64, nP int) Matrix
- func (m Matrix) Apply4(A, B, C Matrix, f func(float64, float64, float64, float64) float64) Matrix
- func (m Matrix) Apply4Parallel(A, B, C Matrix, f func(float64, float64, float64, float64) float64, nP int) Matrix
- func (m Matrix) Apply5Parallel(A, B, C, D Matrix, f func(float64, float64, float64, float64, float64) float64, ...) Matrix
- func (m Matrix) Apply8(A, B, C, D, E, F, G Matrix, ...) Matrix
- func (m Matrix) Assign(I Index, AI interface{}) Matrix
- func (m Matrix) AssignColumns(I Index, A Matrix) Matrix
- func (m Matrix) AssignScalar(I Index, val float64) Matrix
- func (m Matrix) AssignVector(I Index, AI interface{}) Matrix
- func (m Matrix) At(i, j int) float64
- func (m Matrix) Avg() (avg float64)
- func (m Matrix) Col(j int) Vector
- func (m Matrix) Copy(RO ...Matrix) (R Matrix)
- func (m Matrix) Data() []float64
- func (m Matrix) Dims() (r, c int)
- func (m Matrix) ElDiv(A Matrix) Matrix
- func (m Matrix) ElMul(A Matrix, RO ...Matrix) (R Matrix)
- func (m Matrix) Equate(ValuesI interface{}, RangeO ...interface{})
- func (m Matrix) Find(op EvalOp, val float64, abs bool) (I Index)
- func (m Matrix) IndexedAssign(I Index, ValI interface{}) (err error)
- func (m Matrix) Inverse(RO ...Matrix) (R Matrix, err error)
- func (m Matrix) Inverse2(iPiv []int, RO ...Matrix) (R Matrix, err error)
- func (m *Matrix) InverseWithCheck() (R Matrix)
- func (m *Matrix) IsEmpty() bool
- func (m Matrix) IsScalar() bool
- func (m Matrix) LUSolve(b Matrix) (X Matrix)
- func (m Matrix) Max() (max float64)
- func (m Matrix) Min() (min float64)
- func (m Matrix) Mul(A Matrix, RO ...Matrix) (R Matrix)
- func (m Matrix) MulParallel(A Matrix, nP int) (R Matrix)
- func (m Matrix) POW(p int) Matrix
- func (m Matrix) Print(msgI ...string) (o string)
- func (m Matrix) Range(RangeO ...interface{}) (r []float64)
- func (m Matrix) RawMatrix() blas64.General
- func (m Matrix) Row(i int) Vector
- func (m Matrix) Scale(a float64) Matrix
- func (m Matrix) Set(i, j int, val float64) Matrix
- func (m Matrix) SetCol(j int, data []float64) Matrix
- func (m Matrix) SetColFrom(col, rowFrom int, data []float64) Matrix
- func (m Matrix) SetRange(i1, i2, j1, j2 int, val float64) Matrix
- func (m *Matrix) SetReadOnly(name ...string) Matrix
- func (m *Matrix) SetWritable() Matrix
- func (m Matrix) Slice(I, K, J, L int) (R Matrix)
- func (m Matrix) SliceCols(I Index) (R Matrix)
- func (m Matrix) SliceRows(I Index) (R Matrix)
- func (m Matrix) Subset(I Index, newDims ...int) (R Matrix)
- func (m Matrix) SubsetVector(I Index) (V Vector)
- func (m Matrix) Subtract(A Matrix, RO ...Matrix) Matrix
- func (m Matrix) SumCols() (V Vector)
- func (m Matrix) SumRows() (V Vector)
- func (m Matrix) T() mat.Matrix
- func (m Matrix) Transpose() (R Matrix)
- type R1
- type R2
- type R3
- type SurfacePlot
- type Vector
- func (v Vector) Add(a Vector) Vector
- func (v Vector) AddScalar(a float64) Vector
- func (v Vector) Apply(f func(float64) float64) Vector
- func (v Vector) At(i, j int) float64
- func (v Vector) AtVec(i int) float64
- func (v Vector) Concat(w Vector) (r Vector)
- func (v Vector) Copy() Vector
- func (v Vector) Data() []float64
- func (v Vector) Dims() (r, c int)
- func (v Vector) Dot(a Vector) (res float64)
- func (v Vector) ElDiv(a Vector) Vector
- func (v Vector) ElMul(a Vector) Vector
- func (v Vector) Find(op EvalOp, target float64, abs bool) (r Vector)
- func (v Vector) FindOr(op EvalOp, target float64, abs bool, A Vector) (r Vector)
- func (v Vector) Len() int
- func (v Vector) Linspace(begin, end float64) Vector
- func (v Vector) Max() (max float64)
- func (v Vector) Min() (min float64)
- func (v Vector) Minmod() (val float64)
- func (v Vector) Mul(w Vector) (A Matrix)
- func (v Vector) Outer(w Vector) (R Matrix)
- func (v Vector) POW(p int) Vector
- func (v Vector) Print(msgI ...string) (o string)
- func (v Vector) RawVector() blas64.Vector
- func (v Vector) Scale(a float64) Vector
- func (v Vector) Set(a float64) Vector
- func (v Vector) SubVec(a, b Vector)
- func (v Vector) Subset(i1, i2 int) Vector
- func (v Vector) SubsetIndex(I Index) Vector
- func (v Vector) Subtract(a Vector) Vector
- func (v Vector) T() mat.Matrix
- func (v Vector) ToIndex() (I Index)
- func (v Vector) ToMatrix() Matrix
- func (v Vector) Transpose() Matrix
- func (v Vector) Zip(op EvalOp, abs bool, A Vector) (R Vector)
Constants ¶
View Source
const (
NODETOL = 1.e-12
)
Variables ¶
View Source
var ( // Low storage 4th order Runge Kutta coefficients RK4a = []float64{ 0.0, -567301805773.0 / 1357537059087.0, -2404267990393.0 / 2016746695238.0, -3550918686646.0 / 2091501179385.0, -1275806237668.0 / 842570457699.0, } RK4b = []float64{ 1432997174477.0 / 9575080441755.0, 5161836677717.0 / 13612068292357.0, 1720146321549.0 / 2090206949498.0, 3134564353537.0 / 4481467310338.0, 2277821191437.0 / 14882151754819.0, } RK4c = []float64{ 0.0, 1432997174477.0 / 9575080441755.0, 2526269341429.0 / 6820363962896.0, 2006345519317.0 / 3224310063776.0, 2802321613138.0 / 2924317926251.0, 1., } )
Functions ¶
func ArraysTo2Vector ¶
func ArraysToPoints ¶
func ArraysToPoints(r1, r2 []float64) (points []graphics2D.Point)
func ColMajorIndex ¶
func ConstArray ¶
func GetMemUsage ¶
func GetMemUsage() string
func IndexedAssign ¶
func NewSymTriDiagonal ¶
func RowMajorToColMajor ¶
func Split1DMaxChunk ¶
Types ¶
type BlockMatrix ¶
type BlockMatrix struct { M [][]Matrix // First slice points to rows of matrices - Note, the Matrix type allows for scalar matrices Nr, Nc int // number of rows, columns in the square block matrix consisting of a sub-matrix in each cell P []int // Permutation "matrix", created during an LUP decomposition, otherwise nil Pcount int // count of number of pivots, used in determining sign of determinant // contains filtered or unexported fields }
func NewBlockMatrix ¶
func NewBlockMatrix(Nr, Nc int) (R BlockMatrix)
func NewBlockMatrixFromScalar ¶
func NewBlockMatrixFromScalar(A Matrix) (R BlockMatrix)
func (BlockMatrix) Add ¶
func (bm BlockMatrix) Add(ba BlockMatrix)
func (BlockMatrix) Copy ¶
func (bm BlockMatrix) Copy() (R BlockMatrix)
func (BlockMatrix) GetTol ¶
func (bm BlockMatrix) GetTol() (tol float64)
func (BlockMatrix) IsSquare ¶
func (bm BlockMatrix) IsSquare() bool
func (*BlockMatrix) LUPDecompose ¶
func (bm *BlockMatrix) LUPDecompose() (err error)
func (BlockMatrix) LUPDeterminant ¶
func (bm BlockMatrix) LUPDeterminant() (det float64, err error)
func (BlockMatrix) LUPInvert ¶
func (bm BlockMatrix) LUPInvert() (R BlockMatrix, err error)
func (BlockMatrix) LUPSolve ¶
func (bm BlockMatrix) LUPSolve(b []Matrix) (Bx BlockMatrix, err error)
func (BlockMatrix) Mul ¶
func (bm BlockMatrix) Mul(ba BlockMatrix) (R BlockMatrix)
func (BlockMatrix) Print ¶
func (bm BlockMatrix) Print() (out string)
func (BlockMatrix) Scale ¶
func (bm BlockMatrix) Scale(val float64) (R BlockMatrix)
func (BlockMatrix) Transpose ¶
func (bm BlockMatrix) Transpose() (R BlockMatrix)
type CSR ¶
func (CSR) IndexedAssign ¶
func (CSR) RawMatrix ¶
func (m CSR) RawMatrix() *blas.SparseMatrix
type DOK ¶
func (DOK) IndexedAssign ¶
func (DOK) RawMatrix ¶
func (m DOK) RawMatrix() *blas.SparseMatrix
type Index ¶
type Index []int
func NewFromFloat ¶
func NewRangeInclusive ¶
func NewRangeOffset ¶
func (*Index) IndexedAssign ¶
func (Index) RowMajorToColumnMajor ¶
func (Index) ToMatrixReversed ¶
type Index2D ¶
type Index2D struct { // Ind is the combined index in column-major format RI, CI, Ind Index Len int }
func NewIndex2D ¶
type LineChart ¶
func NewLineChart ¶
type Matrix ¶
var (
I, Zero Matrix
)
func (Matrix) Apply3Parallel ¶
func (Matrix) Apply4Parallel ¶
func (Matrix) Apply5Parallel ¶
func (Matrix) AssignVector ¶
func (m Matrix) AssignVector(I Index, Ainv Vector) Matrix { // Changes receiver
func (Matrix) IndexedAssign ¶
func (*Matrix) InverseWithCheck ¶
func (*Matrix) SetReadOnly ¶
Chainable methods (extended)
func (*Matrix) SetWritable ¶
func (Matrix) SubsetVector ¶
type SurfacePlot ¶
type SurfacePlot struct { Chart *chart2d.Chart2D ColorMap *utils2.ColorMap GraphicsMesh *graphics2D.TriMesh }
func NewSurfacePlot ¶
func NewSurfacePlot(width, height int, xmin, xmax, ymin, ymax float64, gm *graphics2D.TriMesh) (sp *SurfacePlot)
func (*SurfacePlot) AddColorMap ¶
func (sp *SurfacePlot) AddColorMap(fmin, fmax float64)
func (*SurfacePlot) AddFunctionSurface ¶
func (sp *SurfacePlot) AddFunctionSurface(field []float32)
Click to show internal directories.
Click to hide internal directories.