-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathstater.go
28 lines (21 loc) · 918 Bytes
/
stater.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2021 The Emergent Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package chem
import "cogentcore.org/lab/table"
// The Stater interface defines the functions implemented for State
// structures containing chem state variables.
// This interface is largely for documentation purposes.
type Stater interface {
// Init Initializes the state to starting default values (concentrations)
Init()
// Zero sets all state variables to zero -- called for deltas after integration
Zero()
// Integrate is called with the deltas -- each state value calls Integrate()
// to update from deltas.
Integrate(d Stater)
// Log records relevant state variables in given table at given row
Log(dt *table.Table, row int)
// ConfigLog configures the table to add column(s) for what is logged
ConfigLog(dt *table.Table)
}