algo_merger

package
v0.0.0-...-1513131 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressJsonData

func CompressJsonData[T any](data *T) ([]byte, error)

func DecompressJsonData

func DecompressJsonData[T any](gzip []byte) (*T, error)

Types

type AlgoNameSorterCounter

type AlgoNameSorterCounter struct {
	// contains filtered or unexported fields
}

func (*AlgoNameSorterCounter) Next

type AlgoSorterCounter

type AlgoSorterCounter interface {
	Next() *CommonAlgoNameDetail
}

func NewAlgoNameSorterCounter

func NewAlgoNameSorterCounter(protoDecompressedAlgoNames []algorithm.AlgorithmName, algoNameDetailListGzipList [][]byte) AlgoSorterCounter

type AlgorithmNameMerger

type AlgorithmNameMerger struct {
	// contains filtered or unexported fields
}

func NewAlgorithmNameMerger

func NewAlgorithmNameMerger(ticker string, timestamps [][]string, file string, factory StorageFactory) *AlgorithmNameMerger

func (*AlgorithmNameMerger) MergeData

func (am *AlgorithmNameMerger) MergeData() error

type CommonAlgoConstraintDetail

type CommonAlgoConstraintDetail struct {
	ConstraintKey string                          `json:"constraintKey"`
	Lengths       map[int]*CommonAlgoLengthDetail `json:"lengths"` // length -> CommonAlgoLengthDetail
}

CommonAlgoConstraintDetail tracks lengths for a specific constraint within an interval.

type CommonAlgoIntervalDetail

type CommonAlgoIntervalDetail struct {
	Interval    int                                    `json:"interval"`
	Constraints map[string]*CommonAlgoConstraintDetail `json:"constraints"` // constraintKey -> CommonAlgoConstraintDetail
}

CommonAlgoIntervalDetail tracks constraints for a specific interval.

type CommonAlgoLengthDetail

type CommonAlgoLengthDetail struct {
	Length    int                              `json:"length"`
	AlgoTypes map[string]*CommonAlgoTypeDetail `json:"algoTypes"` // algoType -> CommonAlgoTypeDetail
}

CommonAlgoLengthDetail tracks AlgoTypes for a specific length within a constraint.

type CommonAlgoNameDetail

type CommonAlgoNameDetail struct {
	AlgoName algorithm.AlgorithmName `json:"algoName"`
	Count    int                     `json:"count"`
}

CommonAlgoNameDetail tracks occurrences of each algoName within an algoType.

type CommonAlgoNameDetailList

type CommonAlgoNameDetailList struct {
	AlgoNameDetailList []*CommonAlgoNameDetail `json:"algoNameDetailList"` // algoName -> CommonAlgoNameDetail
}

type CommonAlgoTracker

type CommonAlgoTracker struct {
	Intervals map[int]*CommonAlgoIntervalDetail `json:"intervals"` // interval -> CommonAlgoIntervalDetail
}

CommonAlgoTracker is the main structure to track all intervals.

func NewCommonAlgoTracker

func NewCommonAlgoTracker() *CommonAlgoTracker

NewCommonAlgoTracker initializes a new CommonAlgoTracker.

type CommonAlgoTypeDetail

type CommonAlgoTypeDetail struct {
	AlgoType                   string   `json:"algoType"`
	AlgoTypeCount              int      `json:"algoTypeCount"`
	AlgoNameDetailListGzipList [][]byte `json:"algoNameDetailListGzipList"`
}

CommonAlgoTypeDetail tracks AlgoNameToCountMap within an algoType for a specific length.

type StorageFactory

type StorageFactory func(ticker, start, end string) algoutil.IFileAlgorithmProtoGzipStorage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL