Esempio n. 1
0
func New(config recon.PTreeConfig, path string) (ptree recon.PrefixTree, err error) {
	tree := &prefixTree{
		PTreeConfig: config,
		path:        path,
		points:      cf.Zpoints(cf.P_SKS, config.NumSamples())}
	ptree = tree
	return
}
Esempio n. 2
0
// Init configures the tree with default settings if not already set,
// and initializes the internal state with sample data points, root node, etc.
func (t *MemPrefixTree) Init() {
	t.PTreeConfig = defaultPTreeConfig
	t.points = cf.Zpoints(cf.P_SKS, t.NumSamples())
	t.allElements = cf.NewZSet()
	t.Create()
}