tnt_subscript.h Source File

Main Page Namespace List Compound List File List Namespace Members Compound Members File Members

# tnt_subscript.h

Go to the documentation of this file.

    00001 /*
    00002 *
    00003 * Template Numerical Toolkit (TNT)
    00004 *
    00005 * Mathematical and Computational Sciences Division
    00006 * National Institute of Technology,
    00007 * Gaithersburg, MD USA
    00008 *
    00009 *
    00010 * This software was developed at the National Institute of Standards and
    00011 * Technology (NIST) by employees of the Federal Government in the course
    00012 * of their official duties. Pursuant to title 17 Section 105 of the
    00013 * United States Code, this software is not subject to copyright protection
    00014 * and is in the public domain. NIST assumes no responsibility whatsoever for
    00015 * its use by other parties, and makes no guarantees, expressed or implied,
    00016 * about its quality, reliability, or any other characteristic.
    00017 *
    00018 */
    00019
    00020
    00021 #ifndef TNT_SUBSCRPT_H
    00022 #define TNT_SUBSCRPT_H
    00023
    00024
    00025 //---------------------------------------------------------------------
    00026 // This definition describes the default TNT data type used for
    00027 // indexing into TNT matrices and vectors.  The data type should
    00028 // be wide enough to index into large arrays.  It defaults to an
    00029 // "int", but can be overriden at compile time redefining TNT_SUBSCRIPT_TYPE,
    00030 // e.g.
    00031 //
    00032 //      c++ -DTNT_SUBSCRIPT_TYPE='unsigned int'  ...
    00033 //
    00034 //---------------------------------------------------------------------
    00035 //
    00036
    00037 #ifndef TNT_SUBSCRIPT_TYPE
    00038 #define TNT_SUBSCRIPT_TYPE int
    00039 #endif
    00040
    00041 namespace TNT
    00042 {
    00043     typedef TNT_SUBSCRIPT_TYPE Subscript;
    00044 }
    00045
    00046
    00047 // () indexing in TNT means 1-offset, i.e. x(1) and A(1,1) are the
    00048 // first elements.  This offset is left as a macro for future
    00049 // purposes, but should not be changed in the current release.
    00050 //
    00051 //
    00052 #define TNT_BASE_OFFSET (1)
    00053
    00054 #endif