C++ for Scientists - Technische Universität Dresden
C++ for Scientists - Technische Universität Dresden C++ for Scientists - Technische Universität Dresden
248 CHAPTER 11. C++ LIBRARIES FOR SCIENTIFIC COMPUTING #include #include #include #include #include #include ... int main () { int n=100; // Define a real n x n matrix glas::dense matrix< double > matrix( n, n ) ; // Define a complex n vector glas::dense vector< std::complex > eigval( n ) ; // Fill the matrix ... // Call LAPACK routine DGEES for computing the eigenvalue Schur form. // We create workspace for best performance. bindings::lapack::gees( matrix, eigval, bindings::lapack::optimal workspace() ) ; ... } Figure 11.4: Example for LAPACK bindings and matrix bindings traits
11.4. MATRIX TEMPLATE LIBRARY 249 coordinate format. The matrix is stored column wise. The template argument 1 indicates that row and column numbers start from one, which is required for the Fortran 90 code MUMPS. Finally, the last argument indicates that the row and column indices are stored in type int, which is also a requirement for the Fortran 90 interface. The solve consists of three phases : (1) the analysis phase, which only needs the matrix’ integer data, (2) the factorization phase, where also the numerical values are required and (3) the solution phase (or backtransformation), where the right-hand side vector is passed on. The included files contain the specializations of the dense matrix and sparse matrix traits for uBLAS and the MUMPS bindings. 11.4 Matrix Template Library 11.5 Blitz++ TODO: We can ask Todd to write something himself — Peter 11.6 Graph Libraries TODO: Few introducing words from Peter 11.6.1 Boost Graph Library TODO: I can write something about it — Peter 11.6.2 LEDA LEDA implements advanced container types and combinatorial algorithms, especially graph algorithms. Containers are parameterized by element type and implementation strategies. Algorithms in general work only with the data structure of the library itself. 11.7 Geometric Libraries TODO: Few introducing words from René and Philipp 11.7.1 CGAL TODO: Ask Sylvain to write something? Or can René and Philipp write it? CGAL implements generic classes and procedures for geometric computing. The data structure complexity is at a very high level.
- Page 198 and 199: 198 CHAPTER 6. INHERITANCE
- Page 200 and 201: 200 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 202 and 203: 202 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 204 and 205: 204 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 206 and 207: 206 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 208 and 209: 208 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 210 and 211: 210 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 212 and 213: 212 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 214 and 215: 214 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 216 and 217: 216 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 218 and 219: 218 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 220 and 221: 220 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 222 and 223: 222 CHAPTER 7. EFFECTIVE PROGRAMMIN
- Page 225 and 226: Finite World of Computers Chapter 8
- Page 227 and 228: 8.2. MORE NUMBERS AND BASIC STRUCTU
- Page 229 and 230: 8.2. MORE NUMBERS AND BASIC STRUCTU
- Page 231 and 232: 8.4. THE OTHER WAY AROUND 231 As ca
- Page 233 and 234: How to Handle Physics on the Comput
- Page 235 and 236: Programming tools Chapter 10 In thi
- Page 237 and 238: 10.2. DEBUGGING 237 T& glas::contin
- Page 239 and 240: 10.3. VALGRIND 239 Stepi and Nexti
- Page 241 and 242: 10.5. UNIX AND LINUX 241 • top: l
- Page 243 and 244: C ++ Libraries for Scientific Compu
- Page 245 and 246: 11.3. BOOST.BINDINGS 245 • Math a
- Page 247: 11.3. BOOST.BINDINGS 247 #include
- Page 251 and 252: 11.7. GEOMETRIC LIBRARIES 251 11.7.
- Page 253 and 254: Real-World Programming Chapter 12 1
- Page 255 and 256: 12.1. TRANSCENDING LEGACY APPLICATI
- Page 257 and 258: 12.1. TRANSCENDING LEGACY APPLICATI
- Page 259 and 260: Parallelism Chapter 13 13.1 Multi-T
- Page 261 and 262: 13.2. MESSAGE PASSING 261 int main
- Page 263 and 264: Numerical exercises Chapter 14 In t
- Page 265 and 266: 14.1. COMPUTING AN EIGENFUNCTION OF
- Page 267 and 268: 14.1. COMPUTING AN EIGENFUNCTION OF
- Page 269 and 270: 14.1. COMPUTING AN EIGENFUNCTION OF
- Page 271 and 272: 14.1. COMPUTING AN EIGENFUNCTION OF
- Page 273 and 274: 14.3. THE SOLUTION OF A SYSTEM OF D
- Page 275 and 276: 14.4. GOOGLE’S PAGE RANK 275 Taki
- Page 277 and 278: 14.5. THE BISECTION METHOD FOR FIND
- Page 279 and 280: 14.6. THE NEWTON-RAPHSON METHOD FOR
- Page 281 and 282: 14.7. SEQUENTIAL NOISE REDUCTION OF
- Page 283 and 284: 14.7. SEQUENTIAL NOISE REDUCTION OF
- Page 285 and 286: Programmierprojekte Kapitel 15 Die
- Page 287 and 288: 15.6. MATRIX-SKALIERUNG 287 Siehe h
- Page 289 and 290: 15.10. ANWENDUNG MTL4 AUF TYPEN MIT
- Page 291 and 292: Acknowledgement Chapter 16 Special
- Page 293: Bibliography [AG04] David Abrahams
11.4. MATRIX TEMPLATE LIBRARY 249<br />
coordinate <strong>for</strong>mat. The matrix is stored column wise. The template argument 1 indicates that<br />
row and column numbers start from one, which is required <strong>for</strong> the Fortran 90 code MUMPS.<br />
Finally, the last argument indicates that the row and column indices are stored in type int,<br />
which is also a requirement <strong>for</strong> the Fortran 90 interface. The solve consists of three phases :<br />
(1) the analysis phase, which only needs the matrix’ integer data, (2) the factorization phase,<br />
where also the numerical values are required and (3) the solution phase (or backtrans<strong>for</strong>mation),<br />
where the right-hand side vector is passed on. The included files contain the specializations of<br />
the dense matrix and sparse matrix traits <strong>for</strong> uBLAS and the MUMPS bindings.<br />
11.4 Matrix Template Library<br />
11.5 Blitz++<br />
TODO: We can ask Todd to write something himself — Peter<br />
11.6 Graph Libraries<br />
TODO: Few introducing words from Peter<br />
11.6.1 Boost Graph Library<br />
TODO: I can write something about it — Peter<br />
11.6.2 LEDA<br />
LEDA implements advanced container types and combinatorial algorithms, especially graph<br />
algorithms. Containers are parameterized by element type and implementation strategies. Algorithms<br />
in general work only with the data structure of the library itself.<br />
11.7 Geometric Libraries<br />
TODO: Few introducing words from René and Philipp<br />
11.7.1 CGAL<br />
TODO: Ask Sylvain to write something? Or can René and Philipp write it?<br />
CGAL implements generic classes and procedures <strong>for</strong> geometric computing. The data structure<br />
complexity is at a very high level.