Skip to content

Commit ea8ed5c

Browse files
committed
Ver 0.34.7
- More features for plot - Explicit getter for ODE
2 parents a72778b + 6457b0b commit ea8ed5c

File tree

4 files changed

+250
-89
lines changed

4 files changed

+250
-89
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "peroxide"
3-
version = "0.34.6"
3+
version = "0.34.7"
44
authors = ["axect <axect@outlook.kr>"]
55
edition = "2018"
66
description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax"
@@ -20,7 +20,7 @@ maintenance = { status = "actively-developed" }
2020
float-cmp = "0.9"
2121

2222
[dependencies]
23-
csv = { version = "1.1", optional = true, default_features = false }
23+
csv = { version = "1", optional = true, default_features = false }
2424
rand = "0.8"
2525
rand_distr = "0.4"
2626
order-stat = "0.1"

RELEASES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Release 0.34.7 (2024-03-11)
2+
3+
## More updates for `plot` feature
4+
5+
- Make legend optional (Now, no legend is available)
6+
- Implement `set_line_style`. Here are available line styles.
7+
- `LineStyle::Solid`
8+
- `LineStyle::Dashed`
9+
- `LineStyle::Dotted`
10+
- `LineStyle::DashDot`
11+
- Implement `set_color`
12+
- Implement `set_alpha`
13+
- More markers.
14+
15+
## Getter for ODE
16+
17+
- Add explicit getter for `ExplicitODE` and `ImplicitODE` for various fields.
18+
119
# Release 0.34.6 (2024-03-01)
220

321
## Big updates for `plot` feature

src/numerical/ode.rs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,38 @@ impl<E: Environment> ExplicitODE<E> {
565565
pub fn get_env(&self) -> &E {
566566
&self.env
567567
}
568+
569+
pub fn get_step_size(&self) -> f64 {
570+
self.step_size
571+
}
572+
573+
pub fn get_times(&self) -> usize {
574+
self.times
575+
}
576+
577+
pub fn get_method(&self) -> ExMethod {
578+
self.method
579+
}
580+
581+
pub fn get_stop_condition(&self) -> fn(&Self) -> bool {
582+
self.stop_cond
583+
}
584+
585+
pub fn get_has_stopped(&self) -> bool {
586+
self.has_stopped
587+
}
588+
589+
pub fn get_init_cond(&self) -> &State<f64> {
590+
&self.init_cond
591+
}
592+
593+
pub fn get_bound_cond1(&self) -> &(State<f64>, BoundaryCondition) {
594+
&self.bound_cond1
595+
}
596+
597+
pub fn get_bound_cond2(&self) -> &(State<f64>, BoundaryCondition) {
598+
&self.bound_cond2
599+
}
568600
}
569601

570602
impl<E: Environment> ODE<E> for ExplicitODE<E> {
@@ -834,6 +866,42 @@ impl<E: Environment> ImplicitODE<E> {
834866
pub fn get_env(&self) -> &E {
835867
&self.env
836868
}
869+
870+
pub fn get_step_size(&self) -> f64 {
871+
self.step_size
872+
}
873+
874+
pub fn get_times(&self) -> usize {
875+
self.times
876+
}
877+
878+
pub fn get_method(&self) -> ImMethod {
879+
self.method
880+
}
881+
882+
pub fn get_stop_condition(&self) -> fn(&Self) -> bool {
883+
self.stop_cond
884+
}
885+
886+
pub fn get_has_stopped(&self) -> bool {
887+
self.has_stopped
888+
}
889+
890+
pub fn get_init_cond(&self) -> &State<f64> {
891+
&self.init_cond
892+
}
893+
894+
pub fn get_bound_cond1(&self) -> &(State<f64>, BoundaryCondition) {
895+
&self.bound_cond1
896+
}
897+
898+
pub fn get_bound_cond2(&self) -> &(State<f64>, BoundaryCondition) {
899+
&self.bound_cond2
900+
}
901+
902+
pub fn get_rtol(&self) -> f64 {
903+
self.rtol
904+
}
837905
}
838906

839907
/// Value of 3f64.sqrt()

0 commit comments

Comments
 (0)