data

package
v0.0.0-...-c0f9bd9 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2014 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparable

type Comparable interface{}

Comparable is alias to any buildin type that can be compared

type Parameter

type Parameter interface{}

Parameter is a one value of input data

type Parameters

type Parameters interface {
	Get(name string) (Parameter, error) // Get one of the parameters
	All() map[string]Parameter          // Get all parameters as map
	Type() uint                         // Get type of the request
	Time() int64                        // Get time of the request
}

Parameters is the interface for expert system input parameters

func CreateParameters

func CreateParameters(data map[string]Parameter) Parameters

CreateParameters generates Parameters interface from the common key-value map

type ParametersComparator

type ParametersComparator func(p1 Parameters, p2 Parameters) bool

ParametersComparator is a function definition that can compare two maps of parameters

type ParamsWeight

type ParamsWeight struct {
	Params     Parameters
	Comparator ParametersComparator
}

ParamsWeight is weight implementation for map of parameters

func (*ParamsWeight) Add

func (pw1 *ParamsWeight) Add(w Weight)

Add is the Weight interface implementation

func (*ParamsWeight) Less

func (pw1 *ParamsWeight) Less(w Weight) bool

Less is the Weight interface implementation

type SingleWeight

type SingleWeight struct {
	Value Comparable
}

SingleWeight is the common single number weight

func (*SingleWeight) Add

func (sw1 *SingleWeight) Add(w Weight)

Add is a Weight interface implementation

func (*SingleWeight) Less

func (sw1 *SingleWeight) Less(w Weight) bool

Less is the Weight interface function implementation

type Weight

type Weight interface {
	Less(w Weight) bool
	Add(w Weight)
}

Weight is an abstract interface for any weight realisation

Jump to

Keyboard shortcuts

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