Documentation ¶
Index ¶
- func GetSimplified(index int) int32
- func GetTraditional(index int) int32
- type BaseSearchEx
- func (this *BaseSearchEx) CreateDict(keywords []string) int
- func (this *BaseSearchEx) Load(filename string)
- func (this *BaseSearchEx) Load2(f *os.File)
- func (this *BaseSearchEx) Save(filename string)
- func (this *BaseSearchEx) Save2(f *os.File)
- func (this *BaseSearchEx) SetKeywords(keywords []string)
- type TrieNode
- type TrieNode2
- type TrieNodeEx
- func (this *TrieNodeEx) Add(c int32) *TrieNodeEx
- func (this *TrieNodeEx) Merge(node *TrieNodeEx)
- func (this *TrieNodeEx) Rank(has []*TrieNodeEx) int
- func (this *TrieNodeEx) Rank2(start int, seats []bool, has []*TrieNodeEx) int
- func (this *TrieNodeEx) SetResults(text int)
- func (this *TrieNodeEx) SetSeats(next int, seats []bool, has []*TrieNodeEx)
- func (this *TrieNodeEx) TryGetValue(c int32) (bool, *TrieNodeEx)
- type TrieNodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSimplified ¶
func GetTraditional ¶
Types ¶
type BaseSearchEx ¶
type BaseSearchEx struct { I_keywords []string I_guides [][]int I_key []int I_next []int I_check []int I_dict []int Mongo *mongo.Database }
func (*BaseSearchEx) CreateDict ¶
func (this *BaseSearchEx) CreateDict(keywords []string) int
func (*BaseSearchEx) Load ¶
func (this *BaseSearchEx) Load(filename string)
func (*BaseSearchEx) Load2 ¶
func (this *BaseSearchEx) Load2(f *os.File)
func (*BaseSearchEx) Save ¶
func (this *BaseSearchEx) Save(filename string)
func (*BaseSearchEx) Save2 ¶
func (this *BaseSearchEx) Save2(f *os.File)
func (*BaseSearchEx) SetKeywords ¶
func (this *BaseSearchEx) SetKeywords(keywords []string)
type TrieNode ¶
type TrieNode struct { Index int Layer int End bool Char int Results []int M_values map[int]*TrieNode Failure *TrieNode Parent *TrieNode }
func NewTrieNode ¶
func NewTrieNode() *TrieNode
func (*TrieNode) SetResults ¶
type TrieNode2 ¶
type TrieNode2 struct { End bool Results []int M_values map[int32]*TrieNode2 // contains filtered or unexported fields }
func NewTrieNode2 ¶
func NewTrieNode2() *TrieNode2
func (*TrieNode2) SetResults ¶
type TrieNodeEx ¶
type TrieNodeEx struct { Parent *TrieNodeEx Failure *TrieNodeEx Char int32 End bool Results []int M_values map[int32]*TrieNodeEx Merge_values map[int32]*TrieNodeEx Next int Count int // contains filtered or unexported fields }
func NewTrieNodeEx ¶
func NewTrieNodeEx() *TrieNodeEx
func (*TrieNodeEx) Add ¶
func (this *TrieNodeEx) Add(c int32) *TrieNodeEx
func (*TrieNodeEx) Merge ¶
func (this *TrieNodeEx) Merge(node *TrieNodeEx)
func (*TrieNodeEx) Rank ¶
func (this *TrieNodeEx) Rank(has []*TrieNodeEx) int
func (*TrieNodeEx) Rank2 ¶
func (this *TrieNodeEx) Rank2(start int, seats []bool, has []*TrieNodeEx) int
func (*TrieNodeEx) SetResults ¶
func (this *TrieNodeEx) SetResults(text int)
func (*TrieNodeEx) SetSeats ¶
func (this *TrieNodeEx) SetSeats(next int, seats []bool, has []*TrieNodeEx)
func (*TrieNodeEx) TryGetValue ¶
func (this *TrieNodeEx) TryGetValue(c int32) (bool, *TrieNodeEx)
Click to show internal directories.
Click to hide internal directories.