diff options
author | Dennis Kobert <dennis@kobert.dev> | 2019-12-12 21:25:04 +0100 |
---|---|---|
committer | Dennis Kobert <dennis@kobert.dev> | 2019-12-12 21:25:04 +0100 |
commit | 5fa0d5d889dff17a8e011971d80de7661ae130eb (patch) | |
tree | fc6b27022e9d57a38391e0705d3e49c41742f1c6 /src/simulation/time_evolution.rs | |
parent | aa98e4dba7d771bd1e9519442f830542cff2860c (diff) |
Add rust code
Diffstat (limited to 'src/simulation/time_evolution.rs')
-rw-r--r-- | src/simulation/time_evolution.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/simulation/time_evolution.rs b/src/simulation/time_evolution.rs new file mode 100644 index 0000000..61c609e --- /dev/null +++ b/src/simulation/time_evolution.rs @@ -0,0 +1,11 @@ +use super::c64; +use ndarray::{Array1, Array2}; + +pub trait MatrixGen { + fn gen(t: f64) -> Array2<c64>; +} + +pub trait State { + fn fibrate(&self) -> Array1<c64>; + fn evolve<G: MatrixGen>(self, t: f64) -> Self; +} |