MCPcopy Create free account
hub / github.com/elftausend/graplot / test_1_x

Function test_1_x

tests/test.rs:125–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123
124#[test]
125fn test_1_x() {
126 let mut xs = [0.; 101];
127
128 let mut add = -50f64;
129 for idx in 0..=100 {
130 xs[idx] = add / 100.;
131 add += 1.;
132 }
133
134 let mut ys = [0.; 101];
135 for (i, y) in ys.iter_mut().enumerate() {
136 if xs[i] != 0. {
137 *y = 1. / xs[i];
138 }
139 }
140
141 let plot = Plot::new((xs, ys));
142 plot.show();
143}
144
145#[test]
146fn test_tanh() {

Callers

nothing calls this directly

Calls 1

showMethod · 0.45

Tested by

no test coverage detected