[f2d6445] | 1 | /* |
---|
| 2 | * |
---|
| 3 | * Template Numerical Toolkit (TNT) |
---|
| 4 | * |
---|
| 5 | * Mathematical and Computational Sciences Division |
---|
| 6 | * National Institute of Technology, |
---|
| 7 | * Gaithersburg, MD USA |
---|
| 8 | * |
---|
| 9 | * |
---|
| 10 | * This software was developed at the National Institute of Standards and |
---|
| 11 | * Technology (NIST) by employees of the Federal Government in the course |
---|
| 12 | * of their official duties. Pursuant to title 17 Section 105 of the |
---|
| 13 | * United States Code, this software is not subject to copyright protection |
---|
| 14 | * and is in the public domain. NIST assumes no responsibility whatsoever for |
---|
| 15 | * its use by other parties, and makes no guarantees, expressed or implied, |
---|
| 16 | * about its quality, reliability, or any other characteristic. |
---|
| 17 | * |
---|
| 18 | */ |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #ifndef TNT_SUBSCRPT_H |
---|
| 22 | #define TNT_SUBSCRPT_H |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | //--------------------------------------------------------------------- |
---|
| 26 | // This definition describes the default TNT data type used for |
---|
| 27 | // indexing into TNT matrices and vectors. The data type should |
---|
| 28 | // be wide enough to index into large arrays. It defaults to an |
---|
| 29 | // "int", but can be overriden at compile time redefining TNT_SUBSCRIPT_TYPE, |
---|
| 30 | // e.g. |
---|
| 31 | // |
---|
| 32 | // c++ -DTNT_SUBSCRIPT_TYPE='unsigned int' ... |
---|
| 33 | // |
---|
| 34 | //--------------------------------------------------------------------- |
---|
| 35 | // |
---|
| 36 | |
---|
| 37 | #ifndef TNT_SUBSCRIPT_TYPE |
---|
| 38 | #define TNT_SUBSCRIPT_TYPE int |
---|
| 39 | #endif |
---|
| 40 | |
---|
| 41 | namespace TNT |
---|
| 42 | { |
---|
| 43 | typedef TNT_SUBSCRIPT_TYPE Subscript; |
---|
| 44 | } /* namespace TNT */ |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | // () indexing in TNT means 1-offset, i.e. x(1) and A(1,1) are the |
---|
| 48 | // first elements. This offset is left as a macro for future |
---|
| 49 | // purposes, but should not be changed in the current release. |
---|
| 50 | // |
---|
| 51 | // |
---|
| 52 | #define TNT_BASE_OFFSET (1) |
---|
| 53 | |
---|
| 54 | #endif |
---|