Sturm  0.0.0
Computing Sturm sequences in C++
Loading...
Searching...
No Matches
Sturm.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2 * Copyright (c) 2026, Davide Stocco and Enrico Bertolazzi. *
3 * *
4 * The Sturm project is distributed under the BSD 2-Clause License. *
5 * *
6 * Davide Stocco Enrico Bertolazzi *
7 * University of Trento University of Trento *
8 * davide.stocco@unitn.it enrico.bertolazzi@unitn.it *
9\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
11#pragma once
12
13#ifndef INCLUDE_STURM_HH
14#define INCLUDE_STURM_HH
15
16// C++ standard libraries
17#include <algorithm>
18#include <iostream>
19#include <sstream>
20#include <string>
21#include <vector>
22
23// Eigen library
24#include <Eigen/Dense>
25
26// Print Sturm errors
27#ifndef STURM_ERROR
28#define STURM_ERROR(MSG) \
29 { \
30 std::ostringstream os; \
31 os << MSG; \
32 throw std::runtime_error(os.str()); \
33 }
34#endif
35
36// Assert for Sturm
37#ifndef STURM_ASSERT
38#define STURM_ASSERT(COND, MSG) \
39 if (!(COND)) { \
40 STURM_ERROR(MSG); \
41 }
42#endif
43
44// Warning for Sturm
45#ifndef STURM_WARNING
46#define STURM_WARNING(MSG) \
47 { std::cout << MSG << std::endl; }
48#endif
49
50// Warning assert for Sturm
51#ifndef STURM_ASSERT_WARNING
52#define STURM_ASSERT_WARNING(COND, MSG) \
53 if (!(COND)) { \
54 STURM_WARNING(MSG); \
55 }
56#endif
57
58// Default integer type
59#ifndef STURM_DEFAULT_INTEGER_TYPE
60#define STURM_DEFAULT_INTEGER_TYPE int
61#endif
62
71namespace Sturm {
72
80
81} // namespace Sturm
82
83#endif // INCLUDE_STURM_HH
#define STURM_DEFAULT_INTEGER_TYPE
Definition Sturm.hh:60
Namespace for the Sturm library.
Definition Sturm.hh:71
STURM_DEFAULT_INTEGER_TYPE Integer
The Integer type as used for the API.
Definition Sturm.hh:79