Пример #1
0
func NewInternal(size int) *BpNode {
	if size < 0 {
		panic(errors.NegativeSize())
	}
	return &BpNode{
		keys:     make([]types.Sortable, 0, size),
		pointers: make([]*BpNode, 0, size),
	}
}
Пример #2
0
func NewLeaf(size int, no_dup bool) *BpNode {
	if size < 0 {
		panic(errors.NegativeSize())
	}
	return &BpNode{
		keys:   make([]types.Sortable, 0, size),
		values: make([]interface{}, 0, size),
		no_dup: no_dup,
	}
}