SparseSolverInline.cxx
1 // Copyright (C) 2010 Vivien Mallet
2 //
3 // This file is part of the linear-algebra library Seldon,
4 // http://seldon.sourceforge.net/.
5 //
6 // Seldon is free software; you can redistribute it and/or modify it under the
7 // terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 2.1 of the License, or (at your option)
9 // any later version.
10 //
11 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 // more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with Seldon. If not, see http://www.gnu.org/licenses/.
18 
19 
20 #ifndef SELDON_FILE_COMPUTATION_SPARSESOLVER_INLINE_CXX
21 
22 
23 #include "SparseSolver.hxx"
24 
25 namespace Seldon
26 {
27 
28  /*************************
29  * Default Seldon solver *
30  *************************/
31 
32 
33  template<class T, class Allocator>
34  inline SparseSeldonSolver<T, Allocator>::SparseSeldonSolver()
35  {
36  print_level = -1;
37  symmetric_matrix = false;
38  permtol = 0.1;
39  }
40 
41 
42  template<class T, class Allocator>
43  inline bool SparseSeldonSolver<T, Allocator>::UseInteger8() const
44  {
45  return false;
46  }
47 
48 
49  template<class T, class Allocator>
50  inline void SparseSeldonSolver<T, Allocator>::Clear()
51  {
52  mat_sym.Clear();
53  mat_unsym.Clear();
54  }
55 
56 
57  template<class T, class Allocator>
58  inline void SparseSeldonSolver<T, Allocator>::HideMessages()
59  {
60  print_level = -1;
61  }
62 
63 
64  template<class T, class Allocator>
65  inline void SparseSeldonSolver<T, Allocator>::ShowMessages()
66  {
67  print_level = 1;
68  }
69 
70 
71  template<class T, class Allocator>
72  inline int SparseSeldonSolver<T, Allocator>::GetPrintLevel() const
73  {
74  return print_level;
75  }
76 
77 
78  template<class T, class Allocator>
79  inline double SparseSeldonSolver<T, Allocator>::GetPivotThreshold() const
80  {
81  return permtol;
82  }
83 
84 
85  template<class T, class Allocator>
87  {
88  permtol = a;
89  }
90 
91 
92  template<class T, class Allocator>
94  {
95  return 0;
96  }
97 
98 } // namespace Seldon.
99 
100 
101 #define SELDON_FILE_COMPUTATION_SPARSESOLVER_INLINE_CXX
102 #endif
Seldon::SparseSeldonSolver::SetPivotThreshold
void SetPivotThreshold(double)
Sets the threshold for pivot.
Definition: SparseSolverInline.cxx:86
Seldon::SparseSeldonSolver
Default solver in Seldon.
Definition: SparseSolver.hxx:111
Seldon
Seldon namespace.
Definition: Array.cxx:24