Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func MakeDenseStore() interface{}
 - func MakeMapStore() interface{}
 - func MakeScoredStore(dense bool) interface{}
 - type ArrayStore
 - func (s *ArrayStore) Clear()
 - func (s *ArrayStore) Get(transition int) (int64, bool)
 - func (s *ArrayStore) Inc(transition int, score int64)
 - func (s *ArrayStore) IncAll(store TransitionScoreStore, integrated bool)
 - func (s *ArrayStore) Init()
 - func (s *ArrayStore) Len() int
 - func (s *ArrayStore) Set(transition int, score int64)
 - func (s *ArrayStore) SetTransitions(transitions []int)
 
- type AvgSparse
 - func (v *AvgSparse) Add(generation, transition int, feature interface{}, amount int64, ...)
 - func (v *AvgSparse) Deserialize(serialized interface{}, generation int)
 - func (v *AvgSparse) Integrate(generation int) *AvgSparse
 - func (v *AvgSparse) Serialize(generation int) interface{}
 - func (v *AvgSparse) SetScores(feature Feature, scores ScoredStore, integrated bool)
 - func (v *AvgSparse) String() string
 - func (v *AvgSparse) UpdateScalarDivide(byValue int64) *AvgSparse
 - func (v *AvgSparse) Value(transition int, feature interface{}) int64
 
- type Feature
 - type FeatureTransMap
 - type HistoryValue
 - type HybridStore
 - func (s *HybridStore) Clear()
 - func (s *HybridStore) Get(transition int) (int64, bool)
 - func (s *HybridStore) Inc(transition int, score int64)
 - func (s *HybridStore) IncAll(store TransitionScoreStore, integrated bool)
 - func (s *HybridStore) Init()
 - func (s *HybridStore) Len() int
 - func (s *HybridStore) Set(transition int, score int64)
 - func (s *HybridStore) SetTransitions(transitions []int)
 
- type LockedArray
 - func (l *LockedArray) Add(generation, transition int, feature interface{}, amount int64)
 - func (l *LockedArray) Each(f TransitionScoreKVFunc)
 - func (l *LockedArray) ExtendFor(generation, transition int)
 - func (l *LockedArray) GetValue(key int) *HistoryValue
 - func (l *LockedArray) Integrate(generation int)
 - func (l *LockedArray) Len() int
 - func (l *LockedArray) SetValue(key int, value *HistoryValue)
 
- type LockedMap
 - func (l *LockedMap) Add(generation, transition int, feature interface{}, amount int64)
 - func (l *LockedMap) Each(f TransitionScoreKVFunc)
 - func (l *LockedMap) GetValue(key int) *HistoryValue
 - func (l *LockedMap) Integrate(generation int)
 - func (l *LockedMap) Len() int
 - func (l *LockedMap) SetValue(key int, value *HistoryValue)
 
- type MapStore
 - func (s *MapStore) Clear()
 - func (s *MapStore) Get(transition int) (int64, bool)
 - func (s *MapStore) Inc(transition int, score int64)
 - func (s *MapStore) IncAll(store TransitionScoreStore, integrated bool)
 - func (s *MapStore) Init()
 - func (s *MapStore) Len() int
 - func (s *MapStore) ScoreMap() map[int]int64
 - func (s *MapStore) Set(transition int, score int64)
 - func (s *MapStore) SetTransitions(transitions []int)
 
- type ScoredStore
 - type SimpleTAF
 - type Sparse
 - func (v Sparse) Add(other Sparse) Sparse
 - func (v Sparse) Copy() Sparse
 - func (v Sparse) DotProduct(other Sparse) int64
 - func (v Sparse) DotProductFeatures(f []Feature) int64
 - func (v Sparse) FeatureWeights(f []Feature) Sparse
 - func (v Sparse) L1Norm() int64
 - func (v Sparse) String() string
 - func (v Sparse) Subtract(other Sparse) Sparse
 - func (v Sparse) UpdateAdd(other Sparse) Sparse
 - func (v Sparse) UpdateScalarDivide(byValue int64) Sparse
 - func (v Sparse) UpdateSubtract(other Sparse) Sparse
 - func (v Sparse) Weighted(other Sparse) Sparse
 
- type TAF
 - type TransitionScoreKVFunc
 - type TransitionScoreStore
 
Constants ¶
      View Source
      
  
const BASE_SIZE int = 10
    Variables ¶
This section is empty.
Functions ¶
func MakeDenseStore ¶
func MakeDenseStore() interface{}
    func MakeMapStore ¶
func MakeMapStore() interface{}
    func MakeScoredStore ¶
func MakeScoredStore(dense bool) interface{}
Types ¶
type ArrayStore ¶
type ArrayStore struct {
	Generation int
	Data       []int64
	DataArray  []int64
	// contains filtered or unexported fields
}
    func (*ArrayStore) Clear ¶
func (s *ArrayStore) Clear()
func (*ArrayStore) Inc ¶
func (s *ArrayStore) Inc(transition int, score int64)
func (*ArrayStore) IncAll ¶
func (s *ArrayStore) IncAll(store TransitionScoreStore, integrated bool)
func (*ArrayStore) Init ¶
func (s *ArrayStore) Init()
func (*ArrayStore) Len ¶
func (s *ArrayStore) Len() int
func (*ArrayStore) Set ¶
func (s *ArrayStore) Set(transition int, score int64)
func (*ArrayStore) SetTransitions ¶
func (s *ArrayStore) SetTransitions(transitions []int)
type AvgSparse ¶
type AvgSparse struct {
	sync.RWMutex
	Dense bool
	Vals  map[Feature]TransitionScoreStore
}
    func MakeAvgSparse ¶
func NewAvgSparse ¶
func NewAvgSparse() *AvgSparse
func (*AvgSparse) Deserialize ¶
func (*AvgSparse) SetScores ¶
func (v *AvgSparse) SetScores(feature Feature, scores ScoredStore, integrated bool)
func (*AvgSparse) UpdateScalarDivide ¶
type FeatureTransMap ¶
type HistoryValue ¶
func NewHistoryValue ¶
func NewHistoryValue(generation int, value int64) *HistoryValue
func (*HistoryValue) Add ¶
func (h *HistoryValue) Add(generation int, amount int64)
func (*HistoryValue) Integrate ¶
func (h *HistoryValue) Integrate(generation int)
func (*HistoryValue) IntegratedValue ¶
func (h *HistoryValue) IntegratedValue(generation int) int64
type HybridStore ¶
type HybridStore struct {
	ArrayStore
	MapStore
	// contains filtered or unexported fields
}
    func (*HybridStore) Clear ¶
func (s *HybridStore) Clear()
func (*HybridStore) Inc ¶
func (s *HybridStore) Inc(transition int, score int64)
func (*HybridStore) IncAll ¶
func (s *HybridStore) IncAll(store TransitionScoreStore, integrated bool)
func (*HybridStore) Init ¶
func (s *HybridStore) Init()
func (*HybridStore) Len ¶
func (s *HybridStore) Len() int
func (*HybridStore) Set ¶
func (s *HybridStore) Set(transition int, score int64)
func (*HybridStore) SetTransitions ¶
func (s *HybridStore) SetTransitions(transitions []int)
type LockedArray ¶
type LockedArray struct {
	sync.RWMutex
	Vals []*HistoryValue
}
    func (*LockedArray) Add ¶
func (l *LockedArray) Add(generation, transition int, feature interface{}, amount int64)
func (*LockedArray) Each ¶
func (l *LockedArray) Each(f TransitionScoreKVFunc)
func (*LockedArray) ExtendFor ¶
func (l *LockedArray) ExtendFor(generation, transition int)
func (*LockedArray) GetValue ¶
func (l *LockedArray) GetValue(key int) *HistoryValue
func (*LockedArray) Integrate ¶
func (l *LockedArray) Integrate(generation int)
func (*LockedArray) Len ¶
func (l *LockedArray) Len() int
func (*LockedArray) SetValue ¶
func (l *LockedArray) SetValue(key int, value *HistoryValue)
type LockedMap ¶
type LockedMap struct {
	sync.RWMutex
	Vals map[int]*HistoryValue
}
    func (*LockedMap) Each ¶
func (l *LockedMap) Each(f TransitionScoreKVFunc)
func (*LockedMap) GetValue ¶
func (l *LockedMap) GetValue(key int) *HistoryValue
func (*LockedMap) SetValue ¶
func (l *LockedMap) SetValue(key int, value *HistoryValue)
type MapStore ¶
type MapStore struct {
	Generation int
	// contains filtered or unexported fields
}
    func (*MapStore) IncAll ¶
func (s *MapStore) IncAll(store TransitionScoreStore, integrated bool)
func (*MapStore) SetTransitions ¶
type ScoredStore ¶
type SimpleTAF ¶
type SimpleTAF struct {
	FTMap FeatureTransMap
}
    func (*SimpleTAF) GetTransFeatures ¶
func (s *SimpleTAF) GetTransFeatures() FeatureTransMap
type Sparse ¶
func (Sparse) DotProduct ¶
func (Sparse) DotProductFeatures ¶
func (Sparse) FeatureWeights ¶
func (Sparse) UpdateScalarDivide ¶
func (Sparse) UpdateSubtract ¶
type TAF ¶
type TAF interface {
	GetTransFeatures() FeatureTransMap
}
    type TransitionScoreKVFunc ¶
type TransitionScoreKVFunc func(key int, value *HistoryValue)
type TransitionScoreStore ¶
type TransitionScoreStore interface {
	Add(generation, transition int, feature interface{}, amount int64)
	Integrate(generation int)
	Len() int
	SetValue(key int, value *HistoryValue)
	GetValue(key int) *HistoryValue
	Each(f TransitionScoreKVFunc)
}
     Click to show internal directories. 
   Click to hide internal directories.