goswarm

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package goswarm is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSystemRandom

func NewSystemRandom() random

Types

type Builder

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

func NewSwarmBuilder

func NewSwarmBuilder(obj Objective) *Builder

func (*Builder) Build

func (b *Builder) Build() Swarm

func (*Builder) LogTo

func (b *Builder) LogTo(logger Logger) *Builder

func (*Builder) TerminateAfterIterations

func (b *Builder) TerminateAfterIterations(iterations int64) *Builder

func (*Builder) TerminateWhenBelowLimit

func (b *Builder) TerminateWhenBelowLimit(limit float64) *Builder

func (*Builder) WithFullyConnectedTopology

func (b *Builder) WithFullyConnectedTopology() *Builder

func (*Builder) WithParticleCount

func (b *Builder) WithParticleCount(count int) *Builder

func (*Builder) WithRingTopology

func (b *Builder) WithRingTopology() *Builder

type Candidate

type Candidate struct {
	Parameters []float64
	Value      float64
	Iteration  int64
}

type ConsoleLogger

type ConsoleLogger struct{}

func (*ConsoleLogger) Log

func (c *ConsoleLogger) Log(currentBest Candidate)

type Logger

type Logger interface {
	Log(currentBest Candidate)
}

type Mockrandom

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

Mockrandom is a mock of random interface

func NewMockrandom

func NewMockrandom(ctrl *gomock.Controller) *Mockrandom

NewMockrandom creates a new mock instance

func (*Mockrandom) EXPECT

func (m *Mockrandom) EXPECT() *MockrandomMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

type MockrandomMockRecorder

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

MockrandomMockRecorder is the mock recorder for Mockrandom

type Objective

type Objective interface {
	Dimensions() int
	GetLowerBound(dimension int) float64
	GetUpperBound(dimension int) float64
	Evaluate(parameter []float64) float64
}

type Swarm

type Swarm interface {
	Minimize() Candidate
}

Jump to

Keyboard shortcuts

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