Documentation
¶
Overview ¶
Package array implements multi-dimensional numerical arrays and convenient methods to work with them.
File Summaries ¶
Short summaries for some of the main files of the package.
`array\cat.go`: a Go source file generated from the text template `array\templates\cat.go`. It implements concrete array types and their methods. `array\cmd\codegen\codegen`: the Go script the parses the code templates in `array\templates` `array\cmd\codegen\config.json`: the settings used by `array\cmd\codegen\codegen` to parse the code templates in `array\templates` `array\cmd\codegen\configLoader.go`: part of the `codegen` package; implements a function for loading `array\cmd\codegen\config.json` `array\cmd\codegen\main.go`: implements the `main` function of the package `codegen` `array\templates\gslice.go`: a text template processed by `array\cmd\codegen\codegen` to generate the Go file `array\gslice.go`. `array\templates\cat.go`: a text template processed by `array\cmd\codegen\codegen` to generate the Go file `array\cat.go`.
File name key ¶
Explanation of some file names to partially alleviate the mental burden of remembering what each file contains.
`cat.go`: (c)oncrete (a)rray (t)ypes `gslice.go`: (g)eneric slice
Index ¶
- Variables
- func CummProdInt(v []int, k ...int) int
- func DotProdInt(u, v []int) (dotProd int)
- func EndsIn1Int(x []int) bool
- func Index(micf []int, indices ...int) int
- func Indices(dims []int, index int) []int
- func Indices2Str(indices []int, bracketType string, separator string) (result string)
- func MultiIndexConversionFactors(dims []int, ndims int) (micf []int)
- func NumelsFromDims(dims []int) int
- func RangeStr2Arr(s string, dim int) ([3]int, error)
- type ArrPkgError
- type ArrayFactory
- func (af *ArrayFactory) Dims(dims ...int) *ArrayFactory
- func (af *ArrayFactory) Float32() (*Float32, error)
- func (af *ArrayFactory) Float64() (*Float64, error)
- func (af *ArrayFactory) Int() (*Int, error)
- func (af *ArrayFactory) Int16() (*Int16, error)
- func (af *ArrayFactory) Int32() (*Int32, error)
- func (af *ArrayFactory) Int64() (*Int64, error)
- func (af *ArrayFactory) Int8() (*Int8, error)
- func (af *ArrayFactory) SetMetadata() (*ArrayFactory, error)
- func (af *ArrayFactory) Uint() (*Uint, error)
- func (af *ArrayFactory) Uint16() (*Uint16, error)
- func (af *ArrayFactory) Uint32() (*Uint32, error)
- func (af *ArrayFactory) Uint64() (*Uint64, error)
- func (af *ArrayFactory) Uint8() (*Uint8, error)
- func (af *ArrayFactory) Uintptr() (*Uintptr, error)
- type Counter
- type Float32
- func (A *Float32) At(indices ...int) *float32
- func (A *Float32) Dir(out io.Writer)
- func (A *Float32) Fill(val float32, numGoRout ...int)
- func (A *Float32) FillSeq(val float32)
- func (A *Float32) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Float32) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Float32) Get(indices ...int) float32
- func (A *Float32) Map(f func(float32) float32, numGoRout ...int)
- func (A *Float32) MapIndex(f func(int) float32, numGoRout ...int)
- func (A *Float32) MapIndexSeq(f func(int) float32)
- func (A *Float32) MapIndexVal(f func(int, float32) float32, numGoRout ...int)
- func (A *Float32) MapIndexValSeq(f func(int, float32) float32)
- func (A *Float32) MapSeq(f func(float32) float32)
- func (A *Float32) Set(val float32, indices ...int)
- func (A *Float32) Slice(s string) (Slice, error)
- func (A *Float32) String() string
- func (A *Float32) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Float32) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Float32) View(slice Slice) (*ViewFloat32, error)
- type Float64
- func (A *Float64) At(indices ...int) *float64
- func (A *Float64) Dir(out io.Writer)
- func (A *Float64) Fill(val float64, numGoRout ...int)
- func (A *Float64) FillSeq(val float64)
- func (A *Float64) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Float64) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Float64) Get(indices ...int) float64
- func (A *Float64) Map(f func(float64) float64, numGoRout ...int)
- func (A *Float64) MapIndex(f func(int) float64, numGoRout ...int)
- func (A *Float64) MapIndexSeq(f func(int) float64)
- func (A *Float64) MapIndexVal(f func(int, float64) float64, numGoRout ...int)
- func (A *Float64) MapIndexValSeq(f func(int, float64) float64)
- func (A *Float64) MapSeq(f func(float64) float64)
- func (A *Float64) Set(val float64, indices ...int)
- func (A *Float64) Slice(s string) (Slice, error)
- func (A *Float64) String() string
- func (A *Float64) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Float64) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Float64) View(slice Slice) (*ViewFloat64, error)
- type Int
- func (A *Int) At(indices ...int) *int
- func (A *Int) Dir(out io.Writer)
- func (A *Int) Fill(val int, numGoRout ...int)
- func (A *Int) FillSeq(val int)
- func (A *Int) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Int) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Int) Get(indices ...int) int
- func (A *Int) Map(f func(int) int, numGoRout ...int)
- func (A *Int) MapIndex(f func(int) int, numGoRout ...int)
- func (A *Int) MapIndexSeq(f func(int) int)
- func (A *Int) MapIndexVal(f func(int, int) int, numGoRout ...int)
- func (A *Int) MapIndexValSeq(f func(int, int) int)
- func (A *Int) MapSeq(f func(int) int)
- func (A *Int) Set(val int, indices ...int)
- func (A *Int) Slice(s string) (Slice, error)
- func (A *Int) String() string
- func (A *Int) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Int) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Int) View(slice Slice) (*ViewInt, error)
- type Int16
- func (A *Int16) At(indices ...int) *int16
- func (A *Int16) Dir(out io.Writer)
- func (A *Int16) Fill(val int16, numGoRout ...int)
- func (A *Int16) FillSeq(val int16)
- func (A *Int16) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Int16) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Int16) Get(indices ...int) int16
- func (A *Int16) Map(f func(int16) int16, numGoRout ...int)
- func (A *Int16) MapIndex(f func(int) int16, numGoRout ...int)
- func (A *Int16) MapIndexSeq(f func(int) int16)
- func (A *Int16) MapIndexVal(f func(int, int16) int16, numGoRout ...int)
- func (A *Int16) MapIndexValSeq(f func(int, int16) int16)
- func (A *Int16) MapSeq(f func(int16) int16)
- func (A *Int16) Set(val int16, indices ...int)
- func (A *Int16) Slice(s string) (Slice, error)
- func (A *Int16) String() string
- func (A *Int16) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Int16) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Int16) View(slice Slice) (*ViewInt16, error)
- type Int32
- func (A *Int32) At(indices ...int) *int32
- func (A *Int32) Dir(out io.Writer)
- func (A *Int32) Fill(val int32, numGoRout ...int)
- func (A *Int32) FillSeq(val int32)
- func (A *Int32) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Int32) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Int32) Get(indices ...int) int32
- func (A *Int32) Map(f func(int32) int32, numGoRout ...int)
- func (A *Int32) MapIndex(f func(int) int32, numGoRout ...int)
- func (A *Int32) MapIndexSeq(f func(int) int32)
- func (A *Int32) MapIndexVal(f func(int, int32) int32, numGoRout ...int)
- func (A *Int32) MapIndexValSeq(f func(int, int32) int32)
- func (A *Int32) MapSeq(f func(int32) int32)
- func (A *Int32) Set(val int32, indices ...int)
- func (A *Int32) Slice(s string) (Slice, error)
- func (A *Int32) String() string
- func (A *Int32) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Int32) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Int32) View(slice Slice) (*ViewInt32, error)
- type Int64
- func (A *Int64) At(indices ...int) *int64
- func (A *Int64) Dir(out io.Writer)
- func (A *Int64) Fill(val int64, numGoRout ...int)
- func (A *Int64) FillSeq(val int64)
- func (A *Int64) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Int64) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Int64) Get(indices ...int) int64
- func (A *Int64) Map(f func(int64) int64, numGoRout ...int)
- func (A *Int64) MapIndex(f func(int) int64, numGoRout ...int)
- func (A *Int64) MapIndexSeq(f func(int) int64)
- func (A *Int64) MapIndexVal(f func(int, int64) int64, numGoRout ...int)
- func (A *Int64) MapIndexValSeq(f func(int, int64) int64)
- func (A *Int64) MapSeq(f func(int64) int64)
- func (A *Int64) Set(val int64, indices ...int)
- func (A *Int64) Slice(s string) (Slice, error)
- func (A *Int64) String() string
- func (A *Int64) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Int64) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Int64) View(slice Slice) (*ViewInt64, error)
- type Int8
- func (A *Int8) At(indices ...int) *int8
- func (A *Int8) Dir(out io.Writer)
- func (A *Int8) Fill(val int8, numGoRout ...int)
- func (A *Int8) FillSeq(val int8)
- func (A *Int8) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Int8) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Int8) Get(indices ...int) int8
- func (A *Int8) Map(f func(int8) int8, numGoRout ...int)
- func (A *Int8) MapIndex(f func(int) int8, numGoRout ...int)
- func (A *Int8) MapIndexSeq(f func(int) int8)
- func (A *Int8) MapIndexVal(f func(int, int8) int8, numGoRout ...int)
- func (A *Int8) MapIndexValSeq(f func(int, int8) int8)
- func (A *Int8) MapSeq(f func(int8) int8)
- func (A *Int8) Set(val int8, indices ...int)
- func (A *Int8) Slice(s string) (Slice, error)
- func (A *Int8) String() string
- func (A *Int8) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Int8) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Int8) View(slice Slice) (*ViewInt8, error)
- type Metadata
- type Range
- type Slice
- type Uint
- func (A *Uint) At(indices ...int) *uint
- func (A *Uint) Dir(out io.Writer)
- func (A *Uint) Fill(val uint, numGoRout ...int)
- func (A *Uint) FillSeq(val uint)
- func (A *Uint) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uint) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uint) Get(indices ...int) uint
- func (A *Uint) Map(f func(uint) uint, numGoRout ...int)
- func (A *Uint) MapIndex(f func(int) uint, numGoRout ...int)
- func (A *Uint) MapIndexSeq(f func(int) uint)
- func (A *Uint) MapIndexVal(f func(int, uint) uint, numGoRout ...int)
- func (A *Uint) MapIndexValSeq(f func(int, uint) uint)
- func (A *Uint) MapSeq(f func(uint) uint)
- func (A *Uint) Set(val uint, indices ...int)
- func (A *Uint) Slice(s string) (Slice, error)
- func (A *Uint) String() string
- func (A *Uint) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uint) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uint) View(slice Slice) (*ViewUint, error)
- type Uint16
- func (A *Uint16) At(indices ...int) *uint16
- func (A *Uint16) Dir(out io.Writer)
- func (A *Uint16) Fill(val uint16, numGoRout ...int)
- func (A *Uint16) FillSeq(val uint16)
- func (A *Uint16) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uint16) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uint16) Get(indices ...int) uint16
- func (A *Uint16) Map(f func(uint16) uint16, numGoRout ...int)
- func (A *Uint16) MapIndex(f func(int) uint16, numGoRout ...int)
- func (A *Uint16) MapIndexSeq(f func(int) uint16)
- func (A *Uint16) MapIndexVal(f func(int, uint16) uint16, numGoRout ...int)
- func (A *Uint16) MapIndexValSeq(f func(int, uint16) uint16)
- func (A *Uint16) MapSeq(f func(uint16) uint16)
- func (A *Uint16) Set(val uint16, indices ...int)
- func (A *Uint16) Slice(s string) (Slice, error)
- func (A *Uint16) String() string
- func (A *Uint16) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uint16) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uint16) View(slice Slice) (*ViewUint16, error)
- type Uint32
- func (A *Uint32) At(indices ...int) *uint32
- func (A *Uint32) Dir(out io.Writer)
- func (A *Uint32) Fill(val uint32, numGoRout ...int)
- func (A *Uint32) FillSeq(val uint32)
- func (A *Uint32) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uint32) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uint32) Get(indices ...int) uint32
- func (A *Uint32) Map(f func(uint32) uint32, numGoRout ...int)
- func (A *Uint32) MapIndex(f func(int) uint32, numGoRout ...int)
- func (A *Uint32) MapIndexSeq(f func(int) uint32)
- func (A *Uint32) MapIndexVal(f func(int, uint32) uint32, numGoRout ...int)
- func (A *Uint32) MapIndexValSeq(f func(int, uint32) uint32)
- func (A *Uint32) MapSeq(f func(uint32) uint32)
- func (A *Uint32) Set(val uint32, indices ...int)
- func (A *Uint32) Slice(s string) (Slice, error)
- func (A *Uint32) String() string
- func (A *Uint32) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uint32) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uint32) View(slice Slice) (*ViewUint32, error)
- type Uint64
- func (A *Uint64) At(indices ...int) *uint64
- func (A *Uint64) Dir(out io.Writer)
- func (A *Uint64) Fill(val uint64, numGoRout ...int)
- func (A *Uint64) FillSeq(val uint64)
- func (A *Uint64) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uint64) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uint64) Get(indices ...int) uint64
- func (A *Uint64) Map(f func(uint64) uint64, numGoRout ...int)
- func (A *Uint64) MapIndex(f func(int) uint64, numGoRout ...int)
- func (A *Uint64) MapIndexSeq(f func(int) uint64)
- func (A *Uint64) MapIndexVal(f func(int, uint64) uint64, numGoRout ...int)
- func (A *Uint64) MapIndexValSeq(f func(int, uint64) uint64)
- func (A *Uint64) MapSeq(f func(uint64) uint64)
- func (A *Uint64) Set(val uint64, indices ...int)
- func (A *Uint64) Slice(s string) (Slice, error)
- func (A *Uint64) String() string
- func (A *Uint64) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uint64) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uint64) View(slice Slice) (*ViewUint64, error)
- type Uint8
- func (A *Uint8) At(indices ...int) *uint8
- func (A *Uint8) Dir(out io.Writer)
- func (A *Uint8) Fill(val uint8, numGoRout ...int)
- func (A *Uint8) FillSeq(val uint8)
- func (A *Uint8) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uint8) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uint8) Get(indices ...int) uint8
- func (A *Uint8) Map(f func(uint8) uint8, numGoRout ...int)
- func (A *Uint8) MapIndex(f func(int) uint8, numGoRout ...int)
- func (A *Uint8) MapIndexSeq(f func(int) uint8)
- func (A *Uint8) MapIndexVal(f func(int, uint8) uint8, numGoRout ...int)
- func (A *Uint8) MapIndexValSeq(f func(int, uint8) uint8)
- func (A *Uint8) MapSeq(f func(uint8) uint8)
- func (A *Uint8) Set(val uint8, indices ...int)
- func (A *Uint8) Slice(s string) (Slice, error)
- func (A *Uint8) String() string
- func (A *Uint8) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uint8) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uint8) View(slice Slice) (*ViewUint8, error)
- type Uintptr
- func (A *Uintptr) At(indices ...int) *uintptr
- func (A *Uintptr) Dir(out io.Writer)
- func (A *Uintptr) Fill(val uintptr, numGoRout ...int)
- func (A *Uintptr) FillSeq(val uintptr)
- func (A *Uintptr) FromCSV(in io.Reader) (int, []int, []error, error)
- func (A *Uintptr) FromCSVFile(fpin string) (int, []int, []error, error)
- func (A *Uintptr) Get(indices ...int) uintptr
- func (A *Uintptr) Map(f func(uintptr) uintptr, numGoRout ...int)
- func (A *Uintptr) MapIndex(f func(int) uintptr, numGoRout ...int)
- func (A *Uintptr) MapIndexSeq(f func(int) uintptr)
- func (A *Uintptr) MapIndexVal(f func(int, uintptr) uintptr, numGoRout ...int)
- func (A *Uintptr) MapIndexValSeq(f func(int, uintptr) uintptr)
- func (A *Uintptr) MapSeq(f func(uintptr) uintptr)
- func (A *Uintptr) Set(val uintptr, indices ...int)
- func (A *Uintptr) Slice(s string) (Slice, error)
- func (A *Uintptr) String() string
- func (A *Uintptr) ToCSV(out io.Writer, printVerb ...string) error
- func (A *Uintptr) ToCSVFile(fpout string, printVerb ...string) error
- func (A *Uintptr) View(slice Slice) (*ViewUintptr, error)
- type ViewFloat32
- type ViewFloat64
- type ViewInt
- type ViewInt16
- type ViewInt32
- type ViewInt64
- type ViewInt8
- type ViewUint
- type ViewUint16
- type ViewUint32
- type ViewUint64
- type ViewUint8
- type ViewUintptr
Constants ¶
This section is empty.
Variables ¶
var ErrPrefix string = "[error:ArrPkgError]"
ErrPrefix is the prefix added to error messages.
var PrintVerbBools string = "%v"
PrintVerbBools is for bools
var PrintVerbFloats string = "%12.4f"
PrintVerbFloats is for floats
var PrintVerbInts string = "%-10d"
PrintVerbInts is for ints
var PrintVerbStrings string = "%s"
PrintVerbStrings is for strings
Functions ¶
func CummProdInt ¶
CummProdInt returns the cummulative product of a slice []int, starting the calculation at position k. If `k` is not supplied, then the calculation starts at v[0]. The argument k is variadic so that it's optional; we don't need more than one value, but we want to have at most one value.
func DotProdInt ¶
DotProdInt returns the inner product of two []int].
func EndsIn1Int ¶
EndsIn1Int checks whether the input slice `x` ends in at least 3 consecutive 1s (ones).
func Index ¶
Index returns the linear index (into an array) that corresponds to the multi-index `indices` passed as input. The conversion requires the multi-index conversion factors as additional input.
func Indices ¶
Indices returns the multi-index (into an array) that corresponds to the linear index `index` passed as input. The conversion requires the dimensions of the array as additional input.
func Indices2Str ¶
Indices2Str converts a slice of type []int to a customised string representation. Example input arguments: indices: []int{1, 2, 3} bracketType: "()" or "[]" separator: ","
func MultiIndexConversionFactors ¶
MultiIndexConversionFactors returns a slice `micf` of integers such that the inner product <micf,(i_1, i_2,..., i_p)>, where (i_1, i_2,..., i_p) is a multi-index with p == len(A.dims), satisfies A[<micf,(i_1, i_2,..., i_p)>] == A[i_1, i_2,..., i_p]. In other words, the result is used to convert multi-indices to linear indices for arrays.
func NumelsFromDims ¶
NumelsFromDims returns the total numbers of elements contained in an `Array` whose dimensions are described by `dims`.
Types ¶
type ArrPkgError ¶
ArrPkgError encodes information related to errors that occur inside the package `array`.
func MakeError ¶
func MakeError(where, what string, errors ...error) ArrPkgError
MakeError makes an error specific to the `array` package.
func (ArrPkgError) Error ¶
func (e ArrPkgError) Error() string
type ArrayFactory ¶
type ArrayFactory struct { // fillVal: Value used to fill the newly constructed array; f(ill)val(ue) // fillVal interface{} Metadata }
ArrayFactory is to be thought of as a struct that contains the settings or blueprint needed to construct a new array. Together with its methods, it is the factory that makes new arrays.
Note: Normally, `ArrayFactory` instances will not be used directly. Their main use is in the "builder pattern"; the latter is used because there is no "constructor overloading" available in Go.
func Factory ¶
func Factory() *ArrayFactory
Factory returns an array factory on which `Make` can be called to construct an instance of the core `Array` type. The `Make<ElementType>` methods are implemented in `concrete.go`
func (*ArrayFactory) Dims ¶
func (af *ArrayFactory) Dims(dims ...int) *ArrayFactory
Dims sets the value of `dims` (in the array factory) representing the dimensions of the newly constructed array
func (*ArrayFactory) Float32 ¶
func (af *ArrayFactory) Float32() (*Float32, error)
Float32 makes a new array with element type `float32`.
func (*ArrayFactory) Float64 ¶
func (af *ArrayFactory) Float64() (*Float64, error)
Float64 makes a new array with element type `float64`.
func (*ArrayFactory) Int ¶
func (af *ArrayFactory) Int() (*Int, error)
Int makes a new array with element type `int`.
func (*ArrayFactory) Int16 ¶
func (af *ArrayFactory) Int16() (*Int16, error)
Int16 makes a new array with element type `int16`.
func (*ArrayFactory) Int32 ¶
func (af *ArrayFactory) Int32() (*Int32, error)
Int32 makes a new array with element type `int32`.
func (*ArrayFactory) Int64 ¶
func (af *ArrayFactory) Int64() (*Int64, error)
Int64 makes a new array with element type `int64`.
func (*ArrayFactory) Int8 ¶
func (af *ArrayFactory) Int8() (*Int8, error)
Int8 makes a new array with element type `int8`.
func (*ArrayFactory) SetMetadata ¶
func (af *ArrayFactory) SetMetadata() (*ArrayFactory, error)
SetMetadata completes the initialisation of `Metadata` inside the receiver `af`. SetMetadata checks that `af.Dims` has meaningful values and calculates `numels` and `micf`. The meta-data include all the information to define the array, except for the elements of the array themselves.
func (*ArrayFactory) Uint ¶
func (af *ArrayFactory) Uint() (*Uint, error)
Uint makes a new array with element type `uint`.
func (*ArrayFactory) Uint16 ¶
func (af *ArrayFactory) Uint16() (*Uint16, error)
Uint16 makes a new array with element type `uint16`.
func (*ArrayFactory) Uint32 ¶
func (af *ArrayFactory) Uint32() (*Uint32, error)
Uint32 makes a new array with element type `uint32`.
func (*ArrayFactory) Uint64 ¶
func (af *ArrayFactory) Uint64() (*Uint64, error)
Uint64 makes a new array with element type `uint64`.
func (*ArrayFactory) Uint8 ¶
func (af *ArrayFactory) Uint8() (*Uint8, error)
Uint8 makes a new array with element type `uint8`.
func (*ArrayFactory) Uintptr ¶
func (af *ArrayFactory) Uintptr() (*Uintptr, error)
Uintptr makes a new array with element type `uintptr`.
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter keeps track, in `digits`, of a counter/multi-index.
type Float32 ¶
Float32 is a concrete array type whose elements are of type `float32`. Float32 is defined by composition of `Metadata` and the slice `Data`.
func (*Float32) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Float32) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Float32) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Float32) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Float32) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Float32) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Float32) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Float32) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Float32) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Float32) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Float32) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Float32) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Float32) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Float64 ¶
Float64 is a concrete array type whose elements are of type `float64`. Float64 is defined by composition of `Metadata` and the slice `Data`.
func (*Float64) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Float64) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Float64) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Float64) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Float64) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Float64) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Float64) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Float64) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Float64) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Float64) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Float64) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Float64) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Float64) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Int ¶
Int is a concrete array type whose elements are of type `int`. Int is defined by composition of `Metadata` and the slice `Data`.
func (*Int) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Int) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Int) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Int) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Int) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Int) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Int) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Int) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Int) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Int) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Int) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Int16 ¶
Int16 is a concrete array type whose elements are of type `int16`. Int16 is defined by composition of `Metadata` and the slice `Data`.
func (*Int16) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Int16) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Int16) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Int16) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Int16) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Int16) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int16) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Int16) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Int16) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Int16) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Int16) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int16) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Int16) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Int32 ¶
Int32 is a concrete array type whose elements are of type `int32`. Int32 is defined by composition of `Metadata` and the slice `Data`.
func (*Int32) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Int32) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Int32) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Int32) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Int32) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Int32) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int32) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Int32) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Int32) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Int32) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Int32) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int32) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Int32) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Int64 ¶
Int64 is a concrete array type whose elements are of type `int64`. Int64 is defined by composition of `Metadata` and the slice `Data`.
func (*Int64) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Int64) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Int64) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Int64) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Int64) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Int64) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int64) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Int64) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Int64) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Int64) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Int64) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int64) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Int64) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Int8 ¶
Int8 is a concrete array type whose elements are of type `int8`. Int8 is defined by composition of `Metadata` and the slice `Data`.
func (*Int8) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Int8) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Int8) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Int8) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Int8) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Int8) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int8) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Int8) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Int8) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Int8) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Int8) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Int8) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Int8) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata contains information that must accompany an array, but not the actual data stored in the array. Each concrete array type (in `cat.go`) has a `Metadata` member.
type Range ¶
type Range [3]int
Range represents a range of integers with a stride/step in the form [start, stop, step].
func MakeRange ¶
MakeRange constructs a `Range` object from 3 integers that represent the start, stop, and step of a range. Of course, since a `Range` is simply an array of type [3]int, it can be constructed directly (e.g., range := Range{1, 2, 1}); however, not every combination of values for start, stop, and step is logically valid and the function `MakeRange` checks the validity of the inputs. "Logically valid" has a meaning in a given context of rules and definitions. The latter are implicit in `MakeRange`'s logic. For example, `start` is not allowed to be larger than `stop`, but, alternatively, `start > stop` could have been allowed to signify an empty range.
type Slice ¶
type Slice []Range
Slice is an array slice used for, well, array slicing.
func MakeSlice ¶
MakeSlice creates a slice that can be used to slice an array. The input is a string representation of the slice to be created. To keep the code simple for now, an "optimistic" approach is taken where the return value is completely constructed and only then validated. Obviously, the construction of the results could terminate early if checking for logical conrrectness is interleaved with the construction steps. `MakeSlice` takes the output of `MakeSliceCore` and checks the indices against the dimensions of the array. No negative indices allowed.
func MakeSliceClip ¶
MakeSliceClip takes the result of `MakeSliceCore` and truncates the indices that exceed the dimensions of the array.
func MakeSliceCore ¶
MakeSliceCore constructs a `Slice` without checking the results against array dimensions or doing any other post-processing.
func MakeSliceWrap ¶
MakeSliceWrap takes the result of `MakeSliceCore` and wraps around indices that exceed the dimensions of the array.
type Uint ¶
Uint is a concrete array type whose elements are of type `uint`. Uint is defined by composition of `Metadata` and the slice `Data`.
func (*Uint) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uint) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uint) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uint) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uint) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uint) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uint) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uint) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uint) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uint) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uint) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Uint16 ¶
Uint16 is a concrete array type whose elements are of type `uint16`. Uint16 is defined by composition of `Metadata` and the slice `Data`.
func (*Uint16) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uint16) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uint16) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uint16) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uint16) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uint16) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint16) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uint16) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uint16) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uint16) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uint16) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint16) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uint16) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Uint32 ¶
Uint32 is a concrete array type whose elements are of type `uint32`. Uint32 is defined by composition of `Metadata` and the slice `Data`.
func (*Uint32) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uint32) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uint32) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uint32) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uint32) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uint32) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint32) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uint32) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uint32) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uint32) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uint32) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint32) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uint32) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Uint64 ¶
Uint64 is a concrete array type whose elements are of type `uint64`. Uint64 is defined by composition of `Metadata` and the slice `Data`.
func (*Uint64) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uint64) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uint64) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uint64) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uint64) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uint64) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint64) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uint64) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uint64) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uint64) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uint64) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint64) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uint64) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Uint8 ¶
Uint8 is a concrete array type whose elements are of type `uint8`. Uint8 is defined by composition of `Metadata` and the slice `Data`.
func (*Uint8) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uint8) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uint8) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uint8) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uint8) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uint8) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint8) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uint8) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uint8) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uint8) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uint8) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uint8) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uint8) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type Uintptr ¶
Uintptr is a concrete array type whose elements are of type `uintptr`. Uintptr is defined by composition of `Metadata` and the slice `Data`.
func (*Uintptr) At ¶
At returns a pointer to the k-th linearly indexed element of an `Array`. It is the most primitive way to access elements, without checking bounds or returning errors.
func (*Uintptr) Fill ¶
Fill sets the value of every element of A equal to `val`. In cases where concurrency can be beneficial for speed, `Fill` should be faster than `FillSeq`. For really small arrays, not only `Fill` will not be faster than `FillSeq`, but actually slower; because for tiny arrays the overhead of concurrency (although minimal in Go) dominates the computation.
func (*Uintptr) FillSeq ¶
FillSeq sets the value of every element of A equal to `val`. This is a sequential implementation, hence the name. There will be a parallel one too.
func (*Uintptr) FromCSV ¶
FromCSV reads from a .csv source into an array.
- Input -- in: a reader from which the csv-formated data can be read.
- Output -- int: number of element read from the input -- []int: indices for which the parsing of an element failed (when reading csv data into an array, each field in the csv is a string that has be parsed into a numerical type; this is the parsing referref to). -- []error: parsing errors that occur during file reading -- error: nil if no errors occured, something hopefully informative otherwise.
func (*Uintptr) FromCSVFile ¶
FromCSVFile reads from a .csv source into an array. `FromCSVFile` is a wrapper around `FromCSV`; regarding the return values, see the documentation for the latter method. The input is the path to the .csv file to be read into the array `A`.
func (*Uintptr) Get ¶
Get returns the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uintptr) MapIndex ¶
MapIndex applies the function `f` to the linear index of each element of the array `A`.
func (*Uintptr) MapIndexSeq ¶
MapIndexSeq applies the function `f` to the linear index of each element of the array `A`.
func (*Uintptr) MapIndexVal ¶
MapIndexVal applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexVal is a map function that takes two arguments: the array element and its index.
func (*Uintptr) MapIndexValSeq ¶
MapIndexValSeq applies the function `f` to all pairs (x, y), where y := linear index of y in `A`. In other words, MapIndexValSeq is a map function that takes two arguments: the array element and its index.
func (*Uintptr) Set ¶
Set sets the value of a single element of an `Array`. Note that `A.Data[k]` can also be accessed directly.
func (*Uintptr) Slice ¶
Slice takes as input a string representation `s` of an array slice and returns a `Slice` (which is of type []Range which is the same as [][3]int) that represents the same information as the input string `s` but in numeric data structure conducive for computation. For example, if s == "[0:5:2]", then we are asking the function `Slice` to construct a `Slice` that starts at 0, stops at 4, and advances with step 2. The result, in this case, will be the `Slice` { {0, 5, 2} }. One advantage of using the function Slice over "manually" instantiating `Slice`s is the the former is slightly user-friendlier.The string representation allows for the usual liberal specification of a slice where some information can be ommitted. This is possible by accessing the metadata in the receiver of the method.
func (*Uintptr) ToCSV ¶
ToCSV saves an array to a .csv file. It also saves a .json file with the same name containing the array metadata. out: io.Writer to write to.
type ViewFloat32 ¶
View is a view into an array.
func (*ViewFloat32) At ¶
func (v *ViewFloat32) At(indices ...int) *float32
At returns the address of a single element of a `View` of an array.
func (*ViewFloat32) Dir ¶
func (v *ViewFloat32) Dir() string
func (*ViewFloat32) Get ¶
func (v *ViewFloat32) Get(indices ...int) float32
Get returns the value of a single element of a `View` of an array.
func (*ViewFloat32) Iterator ¶
func (v *ViewFloat32) Iterator(done <-chan struct{}) <-chan *float32
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewFloat32) Set ¶
func (v *ViewFloat32) Set(val float32, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewFloat32) String ¶
func (A *ViewFloat32) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Float32
type ViewFloat64 ¶
View is a view into an array.
func (*ViewFloat64) At ¶
func (v *ViewFloat64) At(indices ...int) *float64
At returns the address of a single element of a `View` of an array.
func (*ViewFloat64) Dir ¶
func (v *ViewFloat64) Dir() string
func (*ViewFloat64) Get ¶
func (v *ViewFloat64) Get(indices ...int) float64
Get returns the value of a single element of a `View` of an array.
func (*ViewFloat64) Iterator ¶
func (v *ViewFloat64) Iterator(done <-chan struct{}) <-chan *float64
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewFloat64) Set ¶
func (v *ViewFloat64) Set(val float64, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewFloat64) String ¶
func (A *ViewFloat64) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Float64
type ViewInt ¶
View is a view into an array.
func (*ViewInt) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewInt16 ¶
View is a view into an array.
func (*ViewInt16) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewInt32 ¶
View is a view into an array.
func (*ViewInt32) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewInt64 ¶
View is a view into an array.
func (*ViewInt64) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewInt8 ¶
View is a view into an array.
func (*ViewInt8) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewUint ¶
View is a view into an array.
func (*ViewUint) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewUint16 ¶
View is a view into an array.
func (*ViewUint16) At ¶
func (v *ViewUint16) At(indices ...int) *uint16
At returns the address of a single element of a `View` of an array.
func (*ViewUint16) Dir ¶
func (v *ViewUint16) Dir() string
func (*ViewUint16) Get ¶
func (v *ViewUint16) Get(indices ...int) uint16
Get returns the value of a single element of a `View` of an array.
func (*ViewUint16) Iterator ¶
func (v *ViewUint16) Iterator(done <-chan struct{}) <-chan *uint16
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewUint16) Set ¶
func (v *ViewUint16) Set(val uint16, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewUint16) String ¶
func (A *ViewUint16) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Uint16
type ViewUint32 ¶
View is a view into an array.
func (*ViewUint32) At ¶
func (v *ViewUint32) At(indices ...int) *uint32
At returns the address of a single element of a `View` of an array.
func (*ViewUint32) Dir ¶
func (v *ViewUint32) Dir() string
func (*ViewUint32) Get ¶
func (v *ViewUint32) Get(indices ...int) uint32
Get returns the value of a single element of a `View` of an array.
func (*ViewUint32) Iterator ¶
func (v *ViewUint32) Iterator(done <-chan struct{}) <-chan *uint32
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewUint32) Set ¶
func (v *ViewUint32) Set(val uint32, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewUint32) String ¶
func (A *ViewUint32) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Uint32
type ViewUint64 ¶
View is a view into an array.
func (*ViewUint64) At ¶
func (v *ViewUint64) At(indices ...int) *uint64
At returns the address of a single element of a `View` of an array.
func (*ViewUint64) Dir ¶
func (v *ViewUint64) Dir() string
func (*ViewUint64) Get ¶
func (v *ViewUint64) Get(indices ...int) uint64
Get returns the value of a single element of a `View` of an array.
func (*ViewUint64) Iterator ¶
func (v *ViewUint64) Iterator(done <-chan struct{}) <-chan *uint64
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewUint64) Set ¶
func (v *ViewUint64) Set(val uint64, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewUint64) String ¶
func (A *ViewUint64) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Uint64
type ViewUint8 ¶
View is a view into an array.
func (*ViewUint8) Iterator ¶
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
type ViewUintptr ¶
View is a view into an array.
func (*ViewUintptr) At ¶
func (v *ViewUintptr) At(indices ...int) *uintptr
At returns the address of a single element of a `View` of an array.
func (*ViewUintptr) Dir ¶
func (v *ViewUintptr) Dir() string
func (*ViewUintptr) Get ¶
func (v *ViewUintptr) Get(indices ...int) uintptr
Get returns the value of a single element of a `View` of an array.
func (*ViewUintptr) Iterator ¶
func (v *ViewUintptr) Iterator(done <-chan struct{}) <-chan *uintptr
--------------------------------------------------------------------------------
-- Iterator over a view
--------------------------------------------------------------------------------
Iterator returns an iterator over the view of an array
func (*ViewUintptr) Set ¶
func (v *ViewUintptr) Set(val uintptr, indices ...int)
Set sets the value of a single element of a `View` of an array.
func (*ViewUintptr) String ¶
func (A *ViewUintptr) String() string
--------------------------------------------------------------------------------
-- `String`
--------------------------------------------------------------------------------
String prints an Uintptr