static_math/
errors.rs

1//-------------------------------------------------------------------------
2// @file errors.rs
3//
4// @date 06/01/20 22:20:11
5// @author Martin Noblia
6// @email mnoblia@disroot.org
7//
8// @brief
9//
10// @detail
11//
12// Licence MIT:
13// Copyright <2020> <Martin Noblia>
14//
15// Permission is hereby granted, free of charge, to any person obtaining a copy
16// of this software and associated documentation files (the "Software"), to deal
17// in the Software without restriction, including without limitation the rights
18// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19// copies of the Software, and to permit persons to whom the Software is
20// furnished to do so, subject to the following conditions:
21//
22// The above copyright notice and this permission notice shall be included in
23// all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED
24// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
25// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
26// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30//--------------------------------------------------------------------------
31// use std::fmt;
32// use std::error;
33// TODO(elsuizo:2020-08-11): if we need the eigenvalues
34pub type Result<T1> = ::core::result::Result<T1, EigenvalueError>;
35
36/// Errors from Vectors
37#[derive(Debug)]
38pub enum VectorErrors {
39    /// the norm cannot be zero
40    Norm2IsZero,
41}
42
43#[derive(Debug)]
44pub enum EigenvalueError {
45    MaxIterations,
46}
47