Versions in this module Expand all Collapse all v1 v1.0.0 Jan 2, 2019 Changes in this version + const InteractionFields + const TimeLayout + var ErrEmptySet = errors.New("ErrEmptySet") + func PairHash64(rec1, rec2 *Record, indices [4]int) (uint64, error) + type Box struct + LatIndex int + LonIndex int + MaxLat float64 + MaxLon float64 + MinLat float64 + MinLon float64 + func (b *Box) Match(rec *Record) (bool, error) + type ByTimestamp struct + func NewByTimestamp(rs *RecordSet) (*ByTimestamp, error) + func (bt ByTimestamp) Len() int + func (bt ByTimestamp) Less(i, j int) bool + func (bt ByTimestamp) Swap(i, j int) + type Cluster struct + func (c *Cluster) Append(rec *Record) + func (c *Cluster) Data() []*Record + func (c *Cluster) Size() int + func (c *Cluster) String() string + type ClusterMap map[uint64]*Cluster + type Field string + type Generator interface + Generate func(rec Record, index ...int) (Field, error) + type Geohasher RecordSet + func NewGeohasher(rs *RecordSet) *Geohasher + func (g *Geohasher) Generate(rec Record, index ...int) (Field, error) + type HeaderMap struct + Idx int + Present bool + type Headers struct + Fields []string + func (h Headers) Contains(field string) (i int, ok bool) + func (h Headers) ContainsMulti(fields ...string) (idxMap map[string]HeaderMap, ok bool) + func (h Headers) Equals(h2 Headers) bool + func (h Headers) String() string + type Interactions struct + OutputHeaders Headers + RecordHeaders Headers + func NewInteractions(h Headers) (*Interactions, error) + func (inter *Interactions) AddCluster(c *Cluster) error + func (inter *Interactions) Len() int + func (inter *Interactions) Save(filename string) error + type Matching interface + Match func(*Record) (bool, error) + type Record []string + func (r *Record) Value(idx int) (val string, ok bool) + func (r *Record) ValueFrom(hm HeaderMap) (val string, ok bool) + func (r Record) Data() []byte + func (r Record) Distance(r2 Record, latIndex, lonIndex int) (nm float64, err error) + func (r Record) Hash() uint64 + func (r Record) ParseFloat(index int) (float64, error) + func (r Record) ParseInt(index int) (int64, error) + func (r Record) ParseTime(index int) (time.Time, error) + type RecordPair struct + type RecordSet struct + func NewRecordSet() *RecordSet + func OpenRecordSet(filename string) (*RecordSet, error) + func (rs *RecordSet) AppendField(newField string, requiredHeaders []string, gen Generator) (*RecordSet, error) + func (rs *RecordSet) Close() error + func (rs *RecordSet) Flush() error + func (rs *RecordSet) Headers() Headers + func (rs *RecordSet) Read() (*Record, error) + func (rs *RecordSet) Save(name string) error + func (rs *RecordSet) SetHeaders(h Headers) + func (rs *RecordSet) SortByTime() (*RecordSet, error) + func (rs *RecordSet) Stash(rec *Record) + func (rs *RecordSet) Subset(m Matching) (*RecordSet, error) + func (rs *RecordSet) SubsetLimit(m Matching, n int, multipass bool) (*RecordSet, error) + func (rs *RecordSet) UniqueVessels() (VesselSet, error) + func (rs *RecordSet) UniqueVesselsMulti(multipass bool) (VesselSet, error) + func (rs *RecordSet) Write(rec Record) error + type Vessel struct + MMSI string + VesselName string + type VesselSet map[Vessel]int + type Window struct + Data map[uint64]*Record + func NewWindow(rs *RecordSet, width time.Duration) (*Window, error) + func (win *Window) AddRecord(rec Record) + func (win *Window) Config() string + func (win *Window) FindClusters(geohashIndex int) ClusterMap + func (win *Window) InWindow(t time.Time) bool + func (win *Window) Left() time.Time + func (win *Window) Len() int + func (win *Window) RecordInWindow(rec *Record) (bool, error) + func (win *Window) Right() time.Time + func (win *Window) SetIndex(index int) + func (win *Window) SetLeft(marker time.Time) + func (win *Window) SetRight(marker time.Time) + func (win *Window) SetWidth(dur time.Duration) + func (win *Window) Slide(dur time.Duration) + func (win *Window) String() string + func (win *Window) Width() time.Duration