forked from sjwhitworth/golearn
/
group.go
30 lines (28 loc) · 810 Bytes
/
group.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package base
import (
"bytes"
)
// AttributeGroups store related sequences of system values
// in memory for the DenseInstances structure.
type AttributeGroup interface {
// Used for printing
appendToRowBuf(row int, buffer *bytes.Buffer)
// Adds a new Attribute
AddAttribute(Attribute) error
// Returns all Attributes
Attributes() []Attribute
// Gets the byte slice at a given column, row offset
get(int, int) []byte
// Stores the byte slice at a given column, row offset
set(int, int, []byte)
// Sets the reference to underlying memory
setStorage([]byte)
// Gets the size of each row in bytes (rounded up)
RowSizeInBytes() int
// Adds some storage to this group
resize(int)
// Gets a reference to underlying memory
Storage() []byte
// Returns a human-readable summary
String() string
}