algorithms
- Various algorithms implemented in gogbin
- Binary serialisation for (almost) every go data structureinterpolator
- String interpolation from maps of datastatistics
- Statistics librarystructures
- Data structures implemented in go
Package | Description |
---|---|
graph |
Graph Algorithms. Docs |
maths |
Core mathematical algorithms. Docs |
sequences |
Algorithms relating to sequences. Docs |
Golang binary serialisation. Infers schema from go's type system.
Caution
Data will not be able to be unserialised if the underlying type changes.
Encoding
encoder := gbin.NewEncoder[T]()
encoded, err := encoder.Encode(&data)
Decoding
decoder := gbin.NewDecoder[T]()
decoded, err := decoder.Decode(encoded)
Where encoded
/ decoded
are of type []byte
.
EncodeStream
& DecodeStream
can be used alternatively, which perform the same underlying function, but work with io.Writer
and io.Reader
respectively.
Interpolate a string from a map of values.
E.g.
data := interpolator.Object{
"a": "b",
"c": interpolator.Object{
"foo":1
"bar":true
}
}
input := "$a comes after a, but $c.foo doesn't come after $c.bar"
res,err := interpolator.ParseString(input, data)
Will produce a result of:
b comes after a, but 1 doesn't come after true
Package | Description |
---|---|
data |
Analysis of sample data |
regression |
Calculation of regressions on bivariate data |
Caution
Unless explicitely stated, all data is assumed to be sample data, and thus will use Bessel's correction
Package | Description |
---|---|
cartesian |
Implementation of a cartesian coordinate system |
graph |
Implementation of a graph structure |
mpq |
Implementation of a minimum priority queue |
set |
Implementation of an exclusive set in go |
stack |
Implementation of a stack in go |
This project is availible under the Apache-2.0 licence. See LICENCE for details.