func (da *Cedar) PrefixPredict(key []byte, num int) (ids []int) {
	root, err := da.Jump(key, 0)
	if err != nil {
		return
	}
	for from, err := da.begin(root); err == nil; from, err = da.next(from, root) {
		ids = append(ids, from)
		num--
		if num == 0 {
			return
		}
	}
	return
}
func (da *Cedar) PrefixPredict(key []byte, num int) (ids []int) {
	root, err := da.Jump(key, 0)
	if err != nil {
		return
	}
	for from, err := da.begin(root); err == nil; from, err = da.next(from, root) {
		ids = append(ids, from)
		num--
		if num == 0 {
			return
		}
	}
	return
}
func ( da * Cedar ) PrefixPredict ( key [ ] byte , num int ) ( ids [ ] int ) { root , err := da . Jump ( key , 0 ) if err != nil { return } for from , err := da . begin ( root ) ; err == nil ; from , err = da . next ( from , root ) { ids = append ( ids , from ) num -- if num == 0 { return } } return }
// PrefixPredict returns a list of at most `num` nodes which has the key as their prefix.
// These nodes are ordered by their keys.
// If `num` is 0, it returns all matches.
// For example, if the following keys were inserted:
//	id	key
//	19	abc
//	23	ab
//	37	abcd
// then
//	PrefixPredict([]byte("ab"), 2) = [ 23, 19 ]			// predict ["ab", "abc"]
//	PrefixPredict([]byte("ab"), 0) = [ 23, 19, 37 ]		// predict ["ab", "abc", "abcd"]
PrefixPredict returns a list of at most num nodes which has the key as their prefix . These nodes are ordered by their keys . If num is 0 it returns all matches . For example if the following keys were inserted : id key 19 abc 23 ab 37 abcd then PrefixPredict ( [] byte ( ab ) 2 ) = [ 23 19 ] // predict [ ab abc ] PrefixPredict ( [] byte ( ab ) 0 ) = [ 23 19 37 ] // predict [ ab abc abcd ]