computation

package
v0.0.0-...-8a9fb8e Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package computation serve to create and run a sequential computation of the Node system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computation

type Computation struct {
	System  *system.NodeSystem
	Context *node.Context
	Status  bool
	Report  map[node.Node]computestate.ComputeState
}

Computation take a NodeSystem and compute a Context against it.

func New

func New(system *system.NodeSystem, context *node.Context) (*Computation, error)

New create a computation based on a valid, and activated NodeSystem and a Context.

func (*Computation) Compute

func (cp *Computation) Compute() error

Compute run all nodes in the defined order to enhance the Context. At the end of the computation (Status at true), you can read the compute state of each node in the Report.

func (Computation) Equal

func (cp Computation) Equal(o Computation) bool

Equal validate the two Computation are equals.

Jump to

Keyboard shortcuts

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