Documentation ¶
Overview ¶
Package Hashtron implements a hashtron (classifier)
Index ¶
- type Hashtron
- func (h Hashtron) Bits() byte
- func (h Hashtron) BytesBuffer(name string, eol ...byte) (b *bytes.Buffer, err error)
- func (h Hashtron) Forward(sample uint32, negate bool) (out uint64)
- func (h Hashtron) Get(n int) (s uint32, max uint32)
- func (h Hashtron) Len() int
- func (h *Hashtron) ReadJson(b io.Reader) error
- func (h Hashtron) SetBits(bits byte)
- func (h Hashtron) WriteJson(b io.Writer, eol ...byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hashtron ¶
type Hashtron struct {
// contains filtered or unexported fields
}
Hashtron represents individual hashtron (classifier) in memory
func New ¶
New creates a new hashtron (giving pseudo random output), or initialized using a provided program and bits
func (Hashtron) BytesBuffer ¶
BytesBuffer serializes hashtron into a golang code program
func (Hashtron) Forward ¶
Forward calculates the hashtron output on single feaure sample (32 bit uint)
func (*Hashtron) ReadJson ¶ added in v0.0.6
ReadJson deserializes hashtron from a pre-xorred json io.Reader
Click to show internal directories.
Click to hide internal directories.