functions

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package functions provides a map of available functions for the GEP algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncMap

type FuncMap map[string]FuncNode

FuncMap is a map from the symbol name of a function to its defining FuncNode.

type FuncNode

type FuncNode interface {
	// Symbol is the Karva string representation of the function.
	Symbol() string
	// Terminals is the number of input terminals for the function.
	Terminals() int

	// BoolFunction represents a general boolean function.
	BoolFunction([]bool) bool
	// IntFunction represents a general integer function.
	IntFunction([]int) int
	// Float64Function represents a general floating-point function.
	Float64Function([]float64) float64
	// VectorIntFunction represents a general vector of integers function.
	VectorIntFunction([]VectorInt) VectorInt
}

FuncNode defines an available function for the GEP algorithm.

type FuncType added in v2.1.0

type FuncType int

FuncType represents the underlying function type of the model, genome, and gene. This is needed in place of generics.

const (
	Bool FuncType
	Int
	Float64
	VectorInts
)

type VectorInt added in v2.1.0

type VectorInt []int

VectorInt is a vector of integers.

Directories

Path Synopsis
Package boolNodes defines the Boolean function collections available for the GEP algorithm.
Package boolNodes defines the Boolean function collections available for the GEP algorithm.
Package intNodes defines the integer function collection available for the GEP algorithm.
Package intNodes defines the integer function collection available for the GEP algorithm.
Package mathNodes defines the floating-point function collection available for the GEP algorithm.
Package mathNodes defines the floating-point function collection available for the GEP algorithm.
Package vectorIntNodes defines the vector of integers function collection available for the GEP algorithm.
Package vectorIntNodes defines the vector of integers function collection available for the GEP algorithm.

Jump to

Keyboard shortcuts

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