ceres_solver/types.rs
1//! Various helper types.
2
3pub type JacobianType<'a> = Option<&'a mut [Option<&'a mut [&'a mut [f64]]>]>;
4
5pub(crate) enum Either<A, B> {
6 Left(A),
7 Right(B),
8}
9
10impl<A, B, T> Iterator for Either<A, B>
11where
12 A: Iterator<Item = T>,
13 B: Iterator<Item = T>,
14{
15 type Item = T;
16
17 fn next(&mut self) -> Option<Self::Item> {
18 match self {
19 Either::Left(a) => a.next(),
20 Either::Right(b) => b.next(),
21 }
22 }
23}