Documentation
¶
Index ¶
- Constants
- type BundleTree
- func (bt *BundleTree) Deserialize_btree(dec *gob.Decoder) error
- func (bt *BundleTree) Deserialize_deque(dec *gob.Decoder) error
- func (bundletree *BundleTree) Get_score(item Item) (item_score float64)
- func (bundletree *BundleTree) Get_size() int
- func (bt *BundleTree) GobDecode(data []byte) error
- func (bt *BundleTree) GobEncode() ([]byte, error)
- func (bundletree *BundleTree) Has_item(item Item) bool
- func (bundletree *BundleTree) In_top_items(item Item, n int) bool
- func (bundletree *BundleTree) Insert_item(item Item, item_score float64) (removed_item Item)
- func (bundletree *BundleTree) Is_capped() bool
- func (bundletree *BundleTree) Items() map[Item]float64
- func (bundletree *BundleTree) Max_item() Item
- func (bundletree *BundleTree) Min_item() Item
- func (bt *BundleTree) Read_from_file(filename string) error
- func (bundletree *BundleTree) Remove_item(item Item, item_score float64)
- func (bt *BundleTree) Serialize_btree(enc *gob.Encoder) error
- func (bt *BundleTree) Serialize_deque(enc *gob.Encoder) error
- func (bundletree *BundleTree) Show()
- func (bundletree *BundleTree) Show_deque()
- func (bt *BundleTree) Write_to_file(filename string) error
- type Item
- type ItemBundle
Constants ¶
View Source
const HARDCODED_BTREE_DEGREE = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleTree ¶
type BundleTree struct {
Deque *lane.Deque //stores Items
Logger chanlog.Logger
Display_string string //Used as a prefix when displaying items.
// contains filtered or unexported fields
}
func NewBundleTree ¶
func NewBundleTree(n_memory int, logger chanlog.Logger, disp string) *BundleTree
Instantiation
func NewUncappedBundleTree ¶
func NewUncappedBundleTree(logger chanlog.Logger, disp string) *BundleTree
func (*BundleTree) Deserialize_btree ¶
func (bt *BundleTree) Deserialize_btree(dec *gob.Decoder) error
func (*BundleTree) Deserialize_deque ¶
func (bt *BundleTree) Deserialize_deque(dec *gob.Decoder) error
func (*BundleTree) Get_score ¶
func (bundletree *BundleTree) Get_score(item Item) (item_score float64)
Grab properties Needs to be edited to have an error return value for when the lookup fails. Maybe just make the map public???
func (*BundleTree) Get_size ¶
func (bundletree *BundleTree) Get_size() int
func (*BundleTree) GobDecode ¶
func (bt *BundleTree) GobDecode(data []byte) error
func (*BundleTree) GobEncode ¶
func (bt *BundleTree) GobEncode() ([]byte, error)
need all objects to satisfy Gob_Encoder and Gob_Decoder.
func (*BundleTree) Has_item ¶
func (bundletree *BundleTree) Has_item(item Item) bool
func (*BundleTree) In_top_items ¶
func (bundletree *BundleTree) In_top_items(item Item, n int) bool
func (*BundleTree) Insert_item ¶
func (bundletree *BundleTree) Insert_item(item Item, item_score float64) (removed_item Item)
Core functionality
func (*BundleTree) Is_capped ¶
func (bundletree *BundleTree) Is_capped() bool
func (*BundleTree) Items ¶
func (bundletree *BundleTree) Items() map[Item]float64
func (*BundleTree) Max_item ¶
func (bundletree *BundleTree) Max_item() Item
func (*BundleTree) Min_item ¶
func (bundletree *BundleTree) Min_item() Item
func (*BundleTree) Read_from_file ¶
func (bt *BundleTree) Read_from_file(filename string) error
func (*BundleTree) Remove_item ¶
func (bundletree *BundleTree) Remove_item(item Item, item_score float64)
func (*BundleTree) Serialize_btree ¶
func (bt *BundleTree) Serialize_btree(enc *gob.Encoder) error
func (*BundleTree) Serialize_deque ¶
func (bt *BundleTree) Serialize_deque(enc *gob.Encoder) error
func (*BundleTree) Show_deque ¶
func (bundletree *BundleTree) Show_deque()
func (*BundleTree) Write_to_file ¶
func (bt *BundleTree) Write_to_file(filename string) error
bundletrees can be mapped to and from memory.
type ItemBundle ¶
type ItemBundle struct {
Display_string string
// contains filtered or unexported fields
}
func NewItemBundle ¶
func NewItemBundle(item_score float64, disp string) *ItemBundle
func (*ItemBundle) GobDecode ¶
func (ib *ItemBundle) GobDecode(data []byte) error
func (*ItemBundle) GobEncode ¶
func (ib *ItemBundle) GobEncode() ([]byte, error)
func (ItemBundle) String ¶
func (bundle ItemBundle) String() string
Click to show internal directories.
Click to hide internal directories.