Documentation ¶
Overview ¶
Package vlib gonum.go friendly C and R vectors Based on gonum/examples - This example shows how simple user types can be constructed to implement basic vector functionality within the mat package.
Helps interface plotter XYers with vlib library routines ¶
Package vlib provides some trivial functions for vector of int,float64,complex128 and bits. Each corresponding vector is extended from the standard array of data types. Hence it can be type-casted anytime and interface with other libraries
Package vlib provides some trivial functions for vector of int,float64,complex128 and bits. Each corresponding vector is extended from the standard array of data types. Hence it can be type-casted anytime and interface with other libraries
Index ¶
- func Contains(array interface{}, elem interface{}) (found bool, index int)
- func Conv(input, filt []float64, trunc bool) []float64
- func Conv2(X mat.Matrix, filt []float64, trunc bool) *mat.Dense
- func Db(linearValue float64) float64
- func Dot(input1 VectorF, input2 VectorF) float64
- func DotC(input1 VectorC, input2 VectorC) complex128
- func Dotu(input1 VectorC, input2 VectorC) complex128
- func DumpMap2CSV(fname string, arg interface{})
- func DumpMap2CSV2(fname string, arg interface{})
- func ElemAddCmplx(in1, in2 []complex128) []complex128
- func Energy(v VectorF) float64
- func EnergyC(v VectorC) float64
- func ExampleUserVectors()
- func GenType(keyname string, val interface{}) map[string]interface{}
- func GetEJtheta(degree float64) complex128
- func GetSize(v VectorIface) int64
- func GoDotC(input1 VectorC, input2 VectorC, splitN int) complex128
- func InvDb(dBValue float64) float64
- func IsTypeNumeric(t reflect.Type) bool
- func IsTypeString(t reflect.Type) bool
- func LoadMapStructure(fname string, data interface{})
- func LoadStructure(fname string, data interface{})
- func MatchDim(v, m Matrixer) bool
- func Max(v VectorF) float64
- func Mean(v VectorF) float64
- func MeanAndVariance(v VectorF) (mean, variance float64)
- func MeanAndVarianceC(v VectorC) (mean complex128, variance float64)
- func MeanC(v VectorC) complex128
- func Min(v VectorF) float64
- func ModInt(number, N int) int
- func Norm2(v VectorF) float64
- func Norm2C(v VectorC) float64
- func NormC(v VectorF) float64
- func RMS(v VectorF) float64
- func Radian(degree float64) float64
- func RandChars(size int) []uint8
- func RandI(size int, maxvalue int) []int
- func RandNC(variance float64) complex128
- func RandNF(variance float64) float64
- func RandUC(variance float64) complex128
- func RelativeGeo(src, dest Location3D) (distance3d, thetaH, thetaV float64)
- func Resizer(v Matrixer, rows, cols int)
- func SaveMapStructure(data interface{}, fname string, formated ...bool)
- func SaveMapStructure2(data interface{}, fname, keyname, valname string, formated ...bool)
- func SaveStructure(data interface{}, fname string, formated ...bool)
- func Sinc(x float64) float64
- func Sorted(data VectorF) (values VectorF, indx VectorI)
- func Struct2Header(a interface{}) ([]string, error)
- func Struct2Strings(a interface{}) ([]string, error)
- func StructNum2Strings(a interface{}) ([]string, error)
- func Sum(v VectorF) float64
- func SumC(v VectorC) complex128
- func SumDb(dBVals ...float64) float64
- func ToDegree(radian float64) float64
- func ToMap(in interface{}) (map[string]interface{}, error)
- func ToRadian(degree float64) float64
- func Variance(v VectorF) float64
- func VarianceC(v VectorC) float64
- func WrapAngle(degree0to360 float64) (degreePlusMinus180 float64)
- type C
- type CirBuffer
- type Complex
- type GComplexVector
- type GDoubleVector
- type GIntVector
- type Location3D
- func (l Location3D) Cmplx() complex128
- func (l *Location3D) Distance2DFrom(src Location3D) float64
- func (l *Location3D) DistanceFrom(src Location3D) float64
- func (l *Location3D) Float32() []float32
- func (l *Location3D) Float64() []float64
- func (l *Location3D) FromCmplx(val complex128)
- func (l *Location3D) FromSpherical(r, thetaH, thetaV float64)
- func (l *Location3D) Length() float64
- func (l Location3D) Scale(factor float64) Location3D
- func (l Location3D) Scale3D(factor float64) Location3D
- func (l *Location3D) SetHeight(height float64)
- func (l *Location3D) SetLoc(loc2D complex128, height float64)
- func (l *Location3D) SetXY(x, y float64)
- func (l *Location3D) SetXYZ(x, y, z float64)
- func (l *Location3D) Shift2D(deltaxy complex128)
- func (l Location3D) Shift3D(delta Location3D) Location3D
- func (l *Location3D) ToSpherical() (r, thetaH, thetaV float64)
- func (l *Location3D) XY() complex128
- func (l *Location3D) XZ() complex128
- type Matlab
- func (m *Matlab) AddText(pos complex128, text string) string
- func (m *Matlab) Close() error
- func (m *Matlab) Command(cmd string)
- func (m *Matlab) Export(varname string, data interface{})
- func (m *Matlab) ExportStruct(keyname string, val interface{})
- func (m *Matlab) Flush()
- func (m *Matlab) Name() string
- func (m *Matlab) Q(cmd string)
- func (m *Matlab) SetDefaults()
- func (m *Matlab) SetFile(fname string)
- func (m *Matlab) SetWriter(w io.Writer)
- type Matrix
- type MatrixC
- func (m *MatrixC) AppendColumn(colvec VectorC)
- func (m *MatrixC) AppendNCols(n int)
- func (m *MatrixC) AppendNRows(n int)
- func (m MatrixC) Data() []complex128
- func (m MatrixC) GetCol(c int) VectorC
- func (m MatrixC) GetRow(row int) VectorC
- func (m MatrixC) IsEq(val MatrixC) bool
- func (m MatrixC) MatString() string
- func (m MatrixC) Minus(val MatrixC) MatrixC
- func (m MatrixC) NCols() (cols int)
- func (m MatrixC) NRows() (rows int)
- func (m *MatrixC) Scale(val float64)
- func (m *MatrixC) ScaleC(val complex128)
- func (m *MatrixC) SetCol(scol int, colVector VectorC)
- func (m MatrixC) Size() (rows, cols int)
- func (m MatrixC) String() string
- func (m *MatrixC) T() MatrixC
- type MatrixF
- func CreateMatrixF(matrix MatrixF) MatrixF
- func Mul(input1 MatrixF, input2 MatrixF) MatrixF
- func NewDiagMatF(input VectorF) MatrixF
- func NewEyeF(rows int) MatrixF
- func NewMatrixF(rows, cols int) MatrixF
- func NewOnesMatF(rows, cols int) MatrixF
- func RandNMatrix(rows, cols int, variance float64) MatrixF
- func RandUMatrix(rows, cols int) MatrixF
- func ReShape(v VectorF, rows, cols int) MatrixF
- func (m *MatrixF) AppendColumn(colvec VectorF) *MatrixF
- func (m *MatrixF) AppendNCols(n int)
- func (m *MatrixF) AppendNRows(n int)
- func (m *MatrixF) AppendRow(v VectorF)
- func (m MatrixF) DeleteColumn(col int) MatrixF
- func (m MatrixF) Elems() VectorF
- func (m MatrixF) Get(row, col int) float64
- func (m MatrixF) GetCol(col int) VectorF
- func (m MatrixF) GetColRange(begin, end int) MatrixF
- func (m MatrixF) GetCols(col ...int) MatrixF
- func (m MatrixF) GetDiagF() VectorF
- func (m MatrixF) GetRow(row int) VectorF
- func (m MatrixF) GetSubMatF(srow, scol, rows, cols int) MatrixF
- func (m MatrixF) Insert(pos int) MatrixF
- func (m MatrixF) InsertColumn(pos int, val float64) MatrixF
- func (m MatrixF) InsertColumnVector(pos int, input VectorF) MatrixF
- func (m MatrixF) InsertOnes(pos int) MatrixF
- func (m MatrixF) IsEq(val MatrixF) bool
- func (m MatrixF) Len() int
- func (m MatrixF) Minus(val MatrixF) MatrixF
- func (m MatrixF) NCols() (cols int)
- func (m MatrixF) NRows() (rows int)
- func (m *MatrixF) SetCol(scol int, colVector VectorF)
- func (m *MatrixF) SetRow(srow int, rowVector VectorF)
- func (m *MatrixF) SetSubMatF(srow, scol int, input MatrixF)
- func (m MatrixF) Size() (rows, cols int)
- func (m MatrixF) String() string
- func (m MatrixF) T() MatrixF
- func (m MatrixF) XY(i int) (x, y float64)
- func (m MatrixF) XYZ(i int) (x, y, z float64)
- type Matrixer
- type Obj
- type Point
- type PointA
- type R
- type Table
- type VSliceF
- type Vector
- type Vector2D
- type VectorB
- func (v VectorB) At(indx VectorI) VectorB
- func (v VectorB) Clone() VectorB
- func (v VectorB) ErrorCount(compare VectorB) int
- func (v VectorB) Get(indx int) uint8
- func (v VectorB) Len() int
- func (v *VectorB) Resize(size int)
- func (v VectorB) Scale(n int) VectorI
- func (v VectorB) Scale2n(n uint) VectorB
- func (v VectorB) Size() int
- type VectorBool
- type VectorC
- func AddC(A, B VectorC) VectorC
- func Conj(in1 VectorC) VectorC
- func ElemMultC(in1, in2 VectorC) VectorC
- func Location3DtoVecC(locs []Location3D) VectorC
- func NewOnesC(size int) (v VectorC)
- func NewVectorC(size int) VectorC
- func ParseCVec(str string) VectorC
- func RandBPSK(samples int, variance float64) VectorC
- func RandNCVec(samples int, variance float64) VectorC
- func RandPI2BPSK(samples int, variance float64) VectorC
- func RandQPSK(samples int, variance float64) VectorC
- func RandUCVec(samples int, variance float64) VectorC
- func SubC(A, B VectorC) VectorC
- func ToVectorC(input VectorF) VectorC
- func ToVectorC2(re, im VectorF) VectorC
- func (v VectorC) Abs() VectorF
- func (v VectorC) AddC(arg complex128) VectorC
- func (v VectorC) AddVector(input VectorC) VectorC
- func (v *VectorC) AppendAtEnd(val ...complex128)
- func (v VectorC) Delete(pos int) VectorC
- func (v *VectorC) Fill(val complex128)
- func (v VectorC) Imag() VectorF
- func (v VectorC) Insert(pos int, val complex128) VectorC
- func (v VectorC) IsEq(vals VectorC) bool
- func (c VectorC) MarshalJSON() ([]byte, error)
- func (v VectorC) MatString() string
- func (v VectorC) Normalize() (result VectorC, mean complex128, factor float64)
- func (v *VectorC) Ones()
- func (v *VectorC) OnesF()
- func (v *VectorC) PlusEqual(input VectorC)
- func (v VectorC) Real() VectorF
- func (v *VectorC) Resize(size int)
- func (v VectorC) Scale(factor float64) VectorC
- func (v VectorC) ScaleAndShift(shift, scale complex128) VectorC
- func (v VectorC) ScaleC(factor complex128) VectorC
- func (v *VectorC) SetVectorF(input VectorF)
- func (v *VectorC) Shift(input VectorC)
- func (v VectorC) ShiftAndScale(shift, scale complex128) VectorC
- func (v VectorC) ShiftLeft(val complex128) VectorC
- func (v VectorC) Size() int
- func (v VectorC) String() string
- func (v VectorC) ToUnitEnergy() (result VectorC, factor float64)
- func (c *VectorC) UnmarshalJSON(databyte []byte) error
- func (v *VectorC) Zeros()
- type VectorF
- func Add(A, B VectorF) VectorF
- func ElemDivF(in1, in2 VectorF) VectorF
- func ElemMultF(in1, in2 VectorF) VectorF
- func Flip(input VectorF) VectorF
- func InvDbF(in1 VectorF) VectorF
- func IterateF(input VectorF, myfunc func(float64) float64) VectorF
- func Log(vec VectorF) (result VectorF)
- func NewOnesF(size int) (v VectorF)
- func NewSegmentF(begin, step float64, size int) VectorF
- func NewVectorF(size int) VectorF
- func RandBitsF(size int) VectorF
- func RandNFVec(samples int, variance float64) VectorF
- func RandUFVec(size int) VectorF
- func SincF(x VectorF) VectorF
- func Sub(A, B VectorF) VectorF
- func ToVectorF(str string) VectorF
- func (v VectorF) Add(offset float64) VectorF
- func (v VectorF) AddVector(input VectorF) VectorF
- func (v *VectorF) AppendAtEnd(val ...float64)
- func (v VectorF) At(indx VectorI) VectorF
- func (v VectorF) Clone() VectorF
- func (v VectorF) Contains(x float64) bool
- func (v VectorF) Delete(pos int) VectorF
- func (v *VectorF) Fill(val float64)
- func (v VectorF) Find(x float64) VectorI
- func (v VectorF) FindGreater(x float64) VectorI
- func (v VectorF) FindLess(x float64) VectorI
- func (v VectorF) FindSorted(x float64) int
- func (v VectorF) Flip() VectorF
- func (v VectorF) Get(indx int) float64
- func (v VectorF) Insert(pos int, val float64) VectorF
- func (v VectorF) IsEq(vals VectorF) bool
- func (v VectorF) Len() int
- func (v VectorF) Less(i, j int) bool
- func (v VectorF) MatString() string
- func (v VectorF) Min() float64
- func (v VectorF) Normalize() (result VectorF, mean, factor float64)
- func (v *VectorF) Ones()
- func (v *VectorF) OnesF()
- func (v *VectorF) PlusEqual(input VectorF)
- func (v *VectorF) Resize(size int)
- func (v VectorF) Scale(factor float64) VectorF
- func (v VectorF) ScaleAndShift(shift, scale float64) VectorF
- func (v *VectorF) SetSubVec(pos int, vals VectorF)
- func (v VectorF) ShiftAndScale(shift, scale float64) VectorF
- func (v VectorF) Size() int
- func (v VectorF) Sorted() (sorted VectorF)
- func (v VectorF) Sorted2() (sorted VectorF, indx VectorI)
- func (v VectorF) String() string
- func (v VectorF) Sub(offset float64) VectorF
- func (v VectorF) SubV(rhs VectorF) VectorF
- func (v *VectorF) Swap(i, j int)
- func (v VectorF) ToCSV() []string
- func (v VectorF) ToCSVStr() string
- func (v VectorF) Value(i int) float64
- func (v VectorF) XY(i int) (float64, float64)
- func (v *VectorF) Zeros()
- type VectorI
- func (v VectorI) Add(offset int) VectorI
- func (v *VectorI) AppendAtEnd(val ...int)
- func (v VectorI) At(indx ...int) VectorI
- func (v VectorI) AtVec(i, j int) float64
- func (v VectorI) Contains(x int) bool
- func (c *VectorI) Decode(databyte []byte) error
- func (v VectorI) Delete(pos int) VectorI
- func (v VectorI) Find(x int) int
- func (v VectorI) Flip() VectorI
- func (v VectorI) Get(indx int) int
- func (c *VectorI) MarshalJSON() ([]byte, error)
- func (v *VectorI) Resize(size int)
- func (v VectorI) Scale(offset int) VectorI
- func (v *VectorI) SetSubVec(pos int, vals VectorI)
- func (v VectorI) Size() int
- func (v VectorI) Sub(offset int) VectorI
- func (v VectorI) ToCSV() []string
- func (v VectorI) ToCSVStr() string
- func (v VectorI) ToVectorF() VectorF
- func (c *VectorI) UnmarshalJSON(databyte []byte) error
- type VectorIface
- type VectorPos3D
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DotC ¶
func DotC(input1 VectorC, input2 VectorC) complex128
func Dotu ¶
func Dotu(input1 VectorC, input2 VectorC) complex128
Dotu implements the cblas128 based operation
func DumpMap2CSV ¶
func DumpMap2CSV(fname string, arg interface{})
func DumpMap2CSV2 ¶
func DumpMap2CSV2(fname string, arg interface{})
DumpMap2CSV2 dumps all the fields including numbers and strings to CSV
func ElemAddCmplx ¶
func ElemAddCmplx(in1, in2 []complex128) []complex128
func GetEJtheta ¶
func GetEJtheta(degree float64) complex128
func GetSize ¶
func GetSize(v VectorIface) int64
func IsTypeNumeric ¶
func IsTypeString ¶
func LoadMapStructure ¶
func LoadMapStructure(fname string, data interface{})
func LoadStructure ¶
func LoadStructure(fname string, data interface{})
func MeanAndVariance ¶
func MeanAndVarianceC ¶
func MeanAndVarianceC(v VectorC) (mean complex128, variance float64)
MeanAndVarianceC finds the mean and variance of the vector <b>v</b>
vlib.MeanAndVariance(v)
func RandNC ¶
func RandNC(variance float64) complex128
Generates Normal (Gaussian) distributed complex number
func RandUC ¶
func RandUC(variance float64) complex128
RandUC generates Uniformly distributed complex number, Both real and imaginary part are uniformly distributed
func RelativeGeo ¶
func RelativeGeo(src, dest Location3D) (distance3d, thetaH, thetaV float64)
func SaveMapStructure ¶
func SaveMapStructure2 ¶
func SaveStructure ¶
func Struct2Header ¶
Internal utility to convert a struct into array of strings
func Struct2Strings ¶
Internal utility to convert a struct into array of strings
func StructNum2Strings ¶
Internal utility to convert a struct into array of strings
func SumC ¶
func SumC(v VectorC) complex128
Types ¶
type C ¶
type C []float64
C is a user-defined C vector.
type CirBuffer ¶
type CirBuffer struct { Maxlen int // contains filtered or unexported fields }
func NewCirBuffer ¶
type Complex ¶
type Complex complex128
Complex type for overriding JSON and other parsing
func (Complex) MarshalJSON ¶
func (*Complex) UnmarshalJSON ¶
type GComplexVector ¶
type GComplexVector struct { VectorIface // contains filtered or unexported fields }
func (*GComplexVector) SetSize ¶
func (v *GComplexVector) SetSize(size int)
type GDoubleVector ¶
type GDoubleVector struct { VectorIface // contains filtered or unexported fields }
func (*GDoubleVector) SetSize ¶
func (v *GDoubleVector) SetSize(size int)
func (GDoubleVector) String ¶
func (v GDoubleVector) String() string
type GIntVector ¶
type GIntVector struct { VectorIface // contains filtered or unexported fields }
func (*GIntVector) SetSize ¶
func (v *GIntVector) SetSize(size int)
func (GIntVector) String ¶
func (v GIntVector) String() string
type Location3D ¶
type Location3D struct {
X, Y, Z float64
}
var Origin3D Location3D
type Complex complex128
func FromCmplx ¶
func FromCmplx(val complex128) Location3D
func LoadLocationsFromFile ¶
func LoadLocationsFromFile(fcsvname, separator string) []Location3D
func (Location3D) Cmplx ¶
func (l Location3D) Cmplx() complex128
func (*Location3D) Distance2DFrom ¶
func (l *Location3D) Distance2DFrom(src Location3D) float64
func (*Location3D) DistanceFrom ¶
func (l *Location3D) DistanceFrom(src Location3D) float64
func (*Location3D) Float32 ¶
func (l *Location3D) Float32() []float32
func (*Location3D) Float64 ¶
func (l *Location3D) Float64() []float64
func (*Location3D) FromCmplx ¶
func (l *Location3D) FromCmplx(val complex128)
func (*Location3D) FromSpherical ¶
func (l *Location3D) FromSpherical(r, thetaH, thetaV float64)
FromSpherical converts the r,thetaH and thetaV (all in degree to Cartesian)
func (*Location3D) Length ¶
func (l *Location3D) Length() float64
func (Location3D) Scale ¶
func (l Location3D) Scale(factor float64) Location3D
func (Location3D) Scale3D ¶
func (l Location3D) Scale3D(factor float64) Location3D
func (*Location3D) SetHeight ¶
func (l *Location3D) SetHeight(height float64)
func (*Location3D) SetLoc ¶
func (l *Location3D) SetLoc(loc2D complex128, height float64)
func (*Location3D) SetXY ¶
func (l *Location3D) SetXY(x, y float64)
func (*Location3D) SetXYZ ¶
func (l *Location3D) SetXYZ(x, y, z float64)
func (*Location3D) Shift2D ¶
func (l *Location3D) Shift2D(deltaxy complex128)
func (Location3D) Shift3D ¶
func (l Location3D) Shift3D(delta Location3D) Location3D
func (*Location3D) ToSpherical ¶
func (l *Location3D) ToSpherical() (r, thetaH, thetaV float64)
func (*Location3D) XY ¶
func (l *Location3D) XY() complex128
func (*Location3D) XZ ¶
func (l *Location3D) XZ() complex128
type Matlab ¶
type Matlab struct { Silent bool Keys []string Encoder *json.Encoder Json bool // contains filtered or unexported fields }
func (*Matlab) ExportStruct ¶
func (*Matlab) SetDefaults ¶
func (m *Matlab) SetDefaults()
type MatrixC ¶
type MatrixC []VectorC
func NewMatrixC ¶
func RandNMatrixC ¶
func ToMatrixC2 ¶
func (*MatrixC) AppendColumn ¶
func (*MatrixC) AppendNCols ¶
func (*MatrixC) AppendNRows ¶
func (MatrixC) Data ¶
func (m MatrixC) Data() []complex128
Data returns the data in the matrix .. row and then column wise
func (*MatrixC) ScaleC ¶
func (m *MatrixC) ScaleC(val complex128)
type MatrixF ¶
type MatrixF []VectorF
func CreateMatrixF ¶
func NewDiagMatF ¶
func NewMatrixF ¶
func NewOnesMatF ¶
func RandNMatrix ¶
func RandUMatrix ¶
func (*MatrixF) AppendColumn ¶
func (*MatrixF) AppendNCols ¶
func (*MatrixF) AppendNRows ¶
func (MatrixF) DeleteColumn ¶
func (MatrixF) GetColRange ¶
func (MatrixF) GetSubMatF ¶
func (MatrixF) InsertColumnVector ¶
func (MatrixF) InsertOnes ¶
func (*MatrixF) SetSubMatF ¶
type Matrixer ¶
type Obj ¶
type Obj struct { ObjectID interface{} Object interface{} // contains filtered or unexported fields }
func SaveMapStructure(data interface{}, fname, keyname, valname string, formated ...bool) { }
func (Obj) MarshalJSON ¶
func (*Obj) UnmarshalJSON ¶
type R ¶
type R []float64
R is a user-defined R vector.
type VSliceF ¶
type VSliceF struct { sort.Float64Slice // contains filtered or unexported fields }
func NewVSliceF ¶
type Vector ¶
type Vector []int
func (Vector) Scaleloat64 ¶
type Vector2D ¶
type Vector2D struct {
X, Y VectorF
}
Vector2D is a XYer interface based on two VectorF
type VectorB ¶
type VectorB []uint8
func NewVectorB ¶
func RandReadableChars ¶
RandReadableChars returns N printable random characters char=32 to 126
func (VectorB) ErrorCount ¶
type VectorBool ¶
type VectorBool []bool
type VectorC ¶
type VectorC []complex128
func Location3DtoVecC ¶
func Location3DtoVecC(locs []Location3D) VectorC
func NewVectorC ¶
func RandPI2BPSK ¶
RandBPSK Generates a VectorC from BPSK symbols
func ToVectorC2 ¶
func (VectorC) AddC ¶
func (v VectorC) AddC(arg complex128) VectorC
func (*VectorC) AppendAtEnd ¶
func (v *VectorC) AppendAtEnd(val ...complex128)
func (*VectorC) Fill ¶
func (v *VectorC) Fill(val complex128)
Fill sets all the elements of the vector to `val`
func (VectorC) MarshalJSON ¶
func (VectorC) Normalize ¶
func (v VectorC) Normalize() (result VectorC, mean complex128, factor float64)
Normalizes with 0 mean, and unit variance
func (VectorC) ScaleAndShift ¶
func (v VectorC) ScaleAndShift(shift, scale complex128) VectorC
ScaleAndShift returns scale*x+shift for the vector x
func (VectorC) ScaleC ¶
func (v VectorC) ScaleC(factor complex128) VectorC
func (*VectorC) SetVectorF ¶
func (VectorC) ShiftAndScale ¶
func (v VectorC) ShiftAndScale(shift, scale complex128) VectorC
func (VectorC) ShiftLeft ¶
func (v VectorC) ShiftLeft(val complex128) VectorC
Input element is pushed to end of the vector and first element is removed
func (VectorC) ToUnitEnergy ¶
func (*VectorC) UnmarshalJSON ¶
type VectorF ¶
type VectorF []float64
func NewSegmentF ¶
NewSegmentI generates a sequence of int values starting from BEGIN of
length SIZE, e.g NewSegmentF(0,0.5,4) = [0,0.5,1,1.5]
func NewVectorF ¶
func RandUFVec ¶
Generates Uniformly distributed Float Vector of size size Values between 0 to 1 uses rand.Float64()
func (*VectorF) AppendAtEnd ¶
func (VectorF) FindGreater ¶
func (VectorF) FindSorted ¶
Assumes descending ordered vector
func (VectorF) ScaleAndShift ¶
func (VectorF) ShiftAndScale ¶
type VectorI ¶
type VectorI []int
func GetIntKeys ¶
func GetIntKeys(data interface{}) VectorI
func NewSegmentI ¶
NewSegmentI generates a sequence of int values starting from BEGIN of
length SIZE, e.g NewSegmentI(5,3) = [5,6,7]
func NewVectorI ¶
func (*VectorI) AppendAtEnd ¶
func (*VectorI) MarshalJSON ¶
func (*VectorI) UnmarshalJSON ¶
type VectorIface ¶
type VectorIface interface { }
type VectorPos3D ¶
type VectorPos3D []Location3D
Array of Location3D, supports plotter XYer, XYZer
func FromVectorC ¶
func FromVectorC(loc2d VectorC, height float64) VectorPos3D
func (VectorPos3D) Len ¶
func (v VectorPos3D) Len() int
func (VectorPos3D) X ¶
func (v VectorPos3D) X() VectorF
func (VectorPos3D) XY ¶
func (v VectorPos3D) XY(i int) (x, y float64)
func (VectorPos3D) Y ¶
func (v VectorPos3D) Y() VectorF
func (VectorPos3D) Z ¶
func (v VectorPos3D) Z() VectorF