summaryrefslogtreecommitdiff
path: root/stabilizer/stabilizer.go
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-11-07 10:09:26 -0500
committerWill Hawkins <[email protected]>2022-11-07 10:11:26 -0500
commitea39f3e0ddd0b35bf649477f628fabbc0c1ca424 (patch)
treea72e43de0a449ccda1e4178ad973f28f9d051247 /stabilizer/stabilizer.go
parentcaa2534d422ac902f5c9dd82e7350cd0b8dfcdbb (diff)
[Refactor] Add Stabilizer Interface/Package
Add an interface (and an implementation) for a generic stabilizer. This functionality will allow us to easily redefine/experiment with stability algorithms without having to revamp the entire code base all the time.
Diffstat (limited to 'stabilizer/stabilizer.go')
-rw-r--r--stabilizer/stabilizer.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/stabilizer/stabilizer.go b/stabilizer/stabilizer.go
new file mode 100644
index 0000000..d85cedc
--- /dev/null
+++ b/stabilizer/stabilizer.go
@@ -0,0 +1,6 @@
+package stabilizer
+
+type Stabilizer[T any] interface {
+ AddMeasurement(T)
+ IsStable() bool
+}