cheshirekow  v0.1.0
polynomial.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef MPBLOCKS_POLYNOMIAL_H_
28 #define MPBLOCKS_POLYNOMIAL_H_
29 
30 namespace mpblocks {
31 
33 namespace polynomial {
34 
35 static const int Dynamic = -0x01;
36 static const int Sparse = -0x02;
37 
38 
40 template <typename T> int sgn(T val)
41 {
42  return (T(0) < val) - (val < T(0));
43 }
44 
45 
46 } // polynomial
47 } // mpblocks
48 
49 #include <cassert>
50 #include <cmath>
51 #include <mpblocks/linalg.h>
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 #endif // POLY_H_
int sgn(T val)
signum
Definition: polynomial.h:40