Documentation
¶
Index ¶
- func DumpIndex(w io.Writer, idx *Index) error
- type Array
- func (a Array) All(bits ...uint32) bool
- func (a Array) Any(bits ...uint32) bool
- func (a Array) Bytes() int
- func (a Array) Clear(bit uint32)
- func (a Array) Flip(bit uint32) bool
- func (a Array) Has(bit uint32) bool
- func (a Array) Loc(bit uint32) Loc
- func (a Array) NotAll(bits ...uint32) bool
- func (a Array) NotAny(bits ...uint32) bool
- func (a Array) Set(bit uint32)
- type CSVIndexer
- type Domain
- type Index
- func (ix *Index) Add(k uint32, m uint32)
- func (ix *Index) All(ms ...uint32) ([]uint32, error)
- func (ix *Index) Any(ms ...uint32) ([]uint32, error)
- func (ix *Index) Has(k uint32, m uint32) bool
- func (ix *Index) NotAll(ms ...uint32) ([]uint32, error)
- func (ix *Index) NotAny(ms ...uint32) ([]uint32, error)
- func (ix *Index) Query(any, all, nany, nall []uint32) (*Result, error)
- func (ix *Index) Sparsity() float32
- type Indexer
- type Loc
- type Result
- type Table
- type Uint32Array
- type Uint32Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Array ¶
Array represents an array of bytes.
type CSVIndexer ¶
type CSVIndexer struct { *csv.Reader // If true, the first line will be skipped. Header bool // A function that takes a CSV row and returns the key and member // to be index. Parse func([]string) (uint32, uint32, error) }
CSVIndexer is an indexer for CSV structured data.
func NewCSVIndexer ¶
func NewCSVIndexer(r io.Reader) *CSVIndexer
NewCSVIndexer initializes a new CSV parser for building an index.
func (*CSVIndexer) Index ¶
func (p *CSVIndexer) Index() (*Index, error)
Build implements the Indexer interface and builds an index from a CSV file.
type Domain ¶
type Domain struct {
// contains filtered or unexported fields
}
Domain maps a member to a position in the bit array.
func LoadDomain ¶
LoadDomain loads only the domain from an io.Reader.
type Index ¶
Index combines and domain
type Loc ¶
type Loc [2]uint32
Loc is the location of the bit in array consisting of the byte position and the relative bit.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) Complement ¶
type Table ¶
Table is an map of keys to bit arrays.
type Uint32Array ¶
type Uint32Array []uint32
func (Uint32Array) Len ¶
func (a Uint32Array) Len() int
func (Uint32Array) Less ¶
func (a Uint32Array) Less(i, j int) bool
func (Uint32Array) Swap ¶
func (a Uint32Array) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.