spConfig.h

Go to the documentation of this file.
00001 /*
00002  *  CONFIGURATION MACRO DEFINITIONS for sparse matrix routines
00003  *
00004  *  Author:                     Advising professor:
00005  *      Kenneth S. Kundert          Alberto Sangiovanni-Vincentelli
00006  *      U.C. Berkeley
00007  *
00008  *  This file contains macros for the sparse matrix routines that are used
00009  *  to define the personality of the routines.  The user is expected to
00010  *  modify this file to maximize the performance of the routines with
00011  *  his/her matrices.
00012  *
00013  *  Macros are distinguished by using solely capital letters in their
00014  *  identifiers.  This contrasts with C defined identifiers which are
00015  *  strictly lower case, and program variable and procedure names which use
00016  *  both upper and lower case.
00017  */
00018 
00019 
00020 /*
00021  *  Revision and copyright information.
00022  *
00023  *  Copyright (c) 1985,86,87,88
00024  *  by Kenneth S. Kundert and the University of California.
00025  *
00026  *  Permission to use, copy, modify, and distribute this software and
00027  *  its documentation for any purpose and without fee is hereby granted,
00028  *  provided that the copyright notices appear in all copies and
00029  *  supporting documentation and that the authors and the University of
00030  *  California are properly credited.  The authors and the University of
00031  *  California make no representations as to the suitability of this
00032  *  software for any purpose.  It is provided `as is', without express
00033  *  or implied warranty.
00034  *
00035   */
00036 
00037 
00038 #ifndef spCONFIG_DEFS
00039 #define spCONFIG_DEFS
00040 
00041 
00042 
00043 
00044 #ifdef spINSIDE_SPARSE
00045 /*
00046  *  OPTIONS
00047  *
00048  *  These are compiler options.  Set each option to one to compile that
00049  *  section of the code.  If a feature is not desired, set the macro
00050  *  to NO. Recommendations are given in brackets, [ignore them].
00051  *
00052  *  >>> Option descriptions:
00053  *  Arithmetic Precision
00054  *      The precision of the arithmetic used by Sparse can be set by
00055  *      changing changing the spREAL macro.  This macro is
00056 *      contained in the file spMatrix.h.  It is strongly suggested to
00057  *      used double precision with circuit simulators.  Note that
00058  *      because C always performs arithmetic operations in double
00059  *      precision, the only benefit to using single precision is that
00060  *      less storage is required.  There is often a noticeable speed
00061  *      penalty when using single precision.  Sparse internally refers
00062  *      to a spREAL as a RealNumber.
00063  *  REAL
00064  *      This specifies that the routines are expected to handle real
00065  *      systems of equations.  The routines can be compiled to handle
00066  *      both real and complex systems at the same time, but there is a
00067  *      slight speed and memory advantage if the routines are complied
00068  *      to handle only real systems of equations.
00069  *  spCOMPLEX
00070  *      This specifies that the routines will be complied to handle
00071  *      complex systems of equations.
00072  *  EXPANDABLE
00073  *      Setting this compiler flag true (1) makes the matrix
00074  *      expandable before it has been factored.  If the matrix is
00075  *      expandable, then if an element is added that would be
00076  *      considered out of bounds in the current matrix, the size of
00077  *      the matrix is increased to hold that element.  As a result,
00078  *      the size of the matrix need not be known before the matrix is
00079  *      built.  The matrix can be allocated with size zero and
00080  *      expanded.
00081  *  TRANSLATE
00082  *      This option allows the set of external row and column numbers
00083  *      to be non-packed.  In other words, the row and column numbers
00084  *      do not have to be contiguous.  The priced paid for this
00085  *      flexibility is that when TRANSLATE is set true, the time
00086  *      required to initially build the matrix will be greater because
00087  *      the external row and column number must be translated into
00088  *      internal equivalents.  This translation brings about other
00089  *      benefits though.  First, the spGetElement() and
00090  *      spGetAdmittance() routines may be used after the matrix has
00091  *      been factored.  Further, elements, and even rows and columns,
00092  *      may be added to the matrix, and row and columns may be deleted
00093  *      from the matrix, after it has been factored.  Note that when
00094  *      the set of row and column number is not a packed set, neither
00095  *      are the RHS and Solution vectors.  Thus the size of these
00096  *      vectors must be at least as large as the external size, which
00097  *      is the value of the largest given row or column numbers.
00098  *  INITIALIZE
00099  *      Causes the spInitialize(), spGetInitInfo(), and
00100  *      spInstallInitInfo() routines to be compiled.  These routines
00101  *      allow the user to store and read one pointer in each nonzero
00102  *      element in the matrix.  spInitialize() then calls a user
00103  *      specified function for each structural nonzero in the matrix,
00104  *      and includes this pointer as well as the external row and
00105  *      column numbers as arguments.  This allows the user to write
00106  *      custom matrix initialization routines.
00107  *  DIAGONAL_PIVOTING
00108  *      Many matrices, and in particular node- and modified-node
00109  *      admittance matrices, tend to be nearly symmetric and nearly
00110  *      diagonally dominant.  For these matrices, it is a good idea to
00111  *      select pivots from the diagonal.  With this option enabled,
00112  *      this is exactly what happens, though if no satisfactory pivot
00113  *      can be found on the diagonal, an off-diagonal pivot will be
00114  *      used.  If this option is disabled, Sparse does not
00115  *      preferentially search the diagonal.  Because of this, Sparse
00116  *      has a wider variety of pivot candidates available, and so
00117  *      presumably fewer fill-ins will be created.  However, the
00118  *      initial pivot selection process will take considerably longer.
00119  *      If working with node admittance matrices, or other matrices
00120  *      with a strong diagonal, it is probably best to use
00121  *      DIAGONAL_PIVOTING for two reasons.  First, accuracy will be
00122  *      better because pivots will be chosen from the large diagonal
00123  *      elements, thus reducing the chance of growth.  Second, a near
00124  *      optimal ordering will be chosen quickly.  If the class of
00125  *      matrices you are working with does not have a strong diagonal,
00126  *      do not use DIAGONAL_PIVOTING, but consider using a larger
00127  *      threshold.  When DIAGONAL_PIVOTING is turned off, the following
00128  *      options and constants are not used: MODIFIED_MARKOWITZ,
00129  *      MAX_MARKOWITZ_TIES, and TIES_MULTIPLIER.
00130  *  ARRAY_OFFSET
00131  *      This determines whether arrays start at an index of zero or one.
00132  *      This option is necessitated by the fact that standard C
00133  *      convention dictates that arrays begin with an index of zero but
00134  *      the standard mathematic convention states that arrays begin with
00135  *      an index of one.  So if you prefer to start your arrays with
00136  *      zero, or your calling Sparse from FORTRAN, set ARRAY_OFFSET to
00137  *      NO or 0.  Otherwise, set ARRAY_OFFSET to YES or 1.  Note that if
00138  *      you use an offset of one, the arrays that you pass to Sparse
00139  *      must have an allocated length of one plus the size of the
00140  *      matrix.  ARRAY_OFFSET must be either 0 or 1, no other offsets
00141  *      are valid.
00142  *  spSEPARATED_COMPLEX_VECTORS
00143  *      This specifies the format for complex vectors.  If this is set
00144  *      false then a complex vector is made up of one double sized
00145  *      array of RealNumber's in which the real and imaginary numbers
00146  *      are placed in the alternately array in the array.  In other
00147  *      words, the first entry would be Complex[1].Real, then comes
00148  *      Complex[1].Imag, then Complex[1].Real, etc.  If
00149  *      spSEPARATED_COMPLEX_VECTORS is set true, then each complex
00150  *      vector is represented by two arrays of RealNumbers, one with
00151  *      the real terms, the other with the imaginary. [NO]
00152  *  MODIFIED_MARKOWITZ
00153  *      This specifies that the modified Markowitz method of pivot
00154  *      selection is to be used.  The modified Markowitz method differs
00155  *      from standard Markowitz in two ways.  First, under modified
00156  *      Markowitz, the search for a pivot can be terminated early if a
00157  *      adequate (in terms of sparsity) pivot candidate is found.
00158  *      Thus, when using modified Markowitz, the initial factorization
00159  *      can be faster, but at the expense of a suboptimal pivoting
00160  *      order that may slow subsequent factorizations.  The second
00161  *      difference is in the way modified Markowitz breaks Markowitz
00162  *      ties.  When two or more elements are pivot candidates and they
00163  *      all have the same Markowitz product, then the tie is broken by
00164  *      choosing the element that is best numerically.  The numerically
00165  *      best element is the one with the largest ratio of its magnitude
00166  *      to the magnitude of the largest element in the same column,
00167  *      excluding itself.  The modified Markowitz method results in
00168  *      marginally better accuracy.  This option is most appropriate
00169  *      for use when working with very large matrices where the initial
00170  *      factor time represents an unacceptable burden. [NO]
00171  *  DELETE
00172  *      This specifies that the spDeleteRowAndCol() routine
00173  *      should be compiled.  Note that for this routine to be
00174  *      compiled, both DELETE and TRANSLATE should be set true.
00175  *  STRIP
00176  *      This specifies that the spStripFills() routine should be compiled.
00177  *  MODIFIED_NODAL
00178  *      This specifies that the routine that preorders modified node
00179  *      admittance matrices should be compiled.  This routine results
00180  *      in greater speed and accuracy if used with this type of
00181  *      matrix.
00182  *  QUAD_ELEMENT
00183  *      This specifies that the routines that allow four related
00184  *      elements to be entered into the matrix at once should be
00185  *      compiled.  These elements are usually related to an
00186  *      admittance.  The routines affected by QUAD_ELEMENT are the
00187  *      spGetAdmittance, spGetQuad and spGetOnes routines.
00188  *  TRANSPOSE
00189  *      This specifies that the routines that solve the matrix as if
00190  *      it was transposed should be compiled.  These routines are
00191  *      useful when performing sensitivity analysis using the adjoint
00192  *      method.
00193  *  SCALING
00194  *      This specifies that the routine that performs scaling on the
00195  *      matrix should be complied.  Scaling is not strongly
00196  *      supported.  The routine to scale the matrix is provided, but
00197  *      no routines are provided to scale and descale the RHS and
00198  *      Solution vectors.  It is suggested that if scaling is desired,
00199  *      it only be preformed when the pivot order is being chosen [in
00200  *      spOrderAndFactor()].  This is the only time scaling has
00201  *      an effect.  The scaling may then either be removed from the
00202  *      solution by the user or the scaled factors may simply be
00203  *      thrown away. [NO]
00204  *  DOCUMENTATION
00205  *      This specifies that routines that are used to document the
00206  *      matrix, such as spPrint() and spFileMatrix(), should be
00207  *      compiled.
00208  *  DETERMINANT
00209  *      This specifies that the routine spDeterminant() should be complied.
00210  *  STABILITY
00211  *      This specifies that spLargestElement() and spRoundoff() should
00212  *      be compiled.  These routines are used to check the stability (and
00213  *      hence the quality of the pivoting) of the factorization by
00214  *      computing a bound on the size of the element is the matrix E =
00215  *      A - LU.  If this bound is very high after applying
00216  *      spOrderAndFactor(), then the pivot threshold should be raised.
00217  *      If the bound increases greatly after using spFactor(), then the
00218  *      matrix should probably be reordered.
00219  *  CONDITION
00220  *      This specifies that spCondition() and spNorm(), the code that
00221  *      computes a good estimate of the condition number of the matrix,
00222  *      should be compiled.
00223  *  PSEUDOCONDITION
00224  *      This specifies that spPseudoCondition(), the code that computes
00225  *      a crude and easily fooled indicator of ill-conditioning in the
00226  *      matrix, should be compiled.
00227  *  MULTIPLICATION
00228  *      This specifies that the routines to multiply the unfactored
00229  *      matrix by a vector should be compiled.
00230  *  FORTRAN
00231  *      This specifies that the FORTRAN interface routines should be
00232  *      compiled.  When interfacing to FORTRAN programs, the ARRAY_OFFSET
00233  *      options should be set to NO.
00234  *  DEBUG
00235  *      This specifies that additional error checking will be compiled.
00236  *      The type of error checked are those that are common when the
00237  *      matrix routines are first integrated into a user's program.  Once
00238  *      the routines have been integrated in and are running smoothly, this
00239  *      option should be turned off.
00240  */
00241 /* Begin options. */
00242 #define  REAL                           YES
00243 #define  EXPANDABLE                     YES
00244 #define  TRANSLATE                      YES
00245 #define  INITIALIZE                     YES
00246 #define  DIAGONAL_PIVOTING              YES
00247 #define  ARRAY_OFFSET                   NO
00248 #define  MODIFIED_MARKOWITZ             NO
00249 #define  SPARSEDELETE                   YES
00250 #define  STRIP                          YES
00251 #define  MODIFIED_NODAL                 YES
00252 #define  QUAD_ELEMENT                   YES
00253 #define  TRANSPOSE                      YES
00254 #define  SCALING                        YES
00255 #define  DOCUMENTATION                  YES
00256 #define  MULTIPLICATION                 YES
00257 #define  DETERMINANT                    YES
00258 #define  STABILITY                      YES
00259 #define  CONDITION                      YES
00260 #define  PSEUDOCONDITION                YES
00261 #define  FORTRAN                        YES
00262 #define  DEBUG                          NO
00263 
00264 /*
00265  *  The following options affect Sparse exports and so are exported as a
00266  *  side effect.  For this reason they use the `sp' prefix.  The boolean
00267  *  constants YES an NO are not defined in spMatrix.h to avoid conflicts
00268  *  with user code, so use 0 for NO and 1 for YES.
00269  */
00270 #endif /* spINSIDE_SPARSE */
00271 #define  spCOMPLEX                      1
00272 #define  spSEPARATED_COMPLEX_VECTORS    0
00273 #ifdef spINSIDE_SPARSE
00274 
00275 
00276 
00277 
00278 
00279 
00280 
00281 /*
00282  *  MATRIX CONSTANTS
00283  *
00284  *  These constants are used throughout the sparse matrix routines.  They
00285  *  should be set to suit the type of matrix being solved.  Recommendations
00286  *  are given in brackets.
00287  *
00288  *  Some terminology should be defined.  The Markowitz row count is the number
00289  *  of non-zero elements in a row excluding the one being considered as pivot.
00290  *  There is one Markowitz row count for every row.  The Markowitz column
00291  *  is defined similarly for columns.  The Markowitz product for an element
00292  *  is the product of its row and column counts. It is a measure of how much
00293  *  work would be required on the next step of the factorization if that
00294  *  element were chosen to be pivot.  A small Markowitz product is desirable.
00295  *
00296  *  >>> Constants descriptions:
00297  *  DEFAULT_THRESHOLD
00298  *      The relative threshold used if the user enters an invalid
00299  *      threshold.  Also the threshold used by spFactor() when
00300  *      calling spOrderAndFactor().  The default threshold should
00301  *      not be less than or equal to zero nor larger than one. [0.001]
00302  *  DIAG_PIVOTING_AS_DEFAULT
00303  *      This indicates whether spOrderAndFactor() should use diagonal
00304  *      pivoting as default.  This issue only arises when
00305  *      spOrderAndFactor() is called from spFactor().
00306  *  SPACE_FOR_ELEMENTS
00307  *      This number multiplied by the size of the matrix equals the number
00308  *      of elements for which memory is initially allocated in
00309  *      spCreate(). [6]
00310  *  SPACE_FOR_FILL_INS
00311  *      This number multiplied by the size of the matrix equals the number
00312  *      of elements for which memory is initially allocated and specifically
00313  *      reserved for fill-ins in spCreate(). [4]
00314  *  ELEMENTS_PER_ALLOCATION
00315  *      The number of matrix elements requested from the malloc utility on
00316  *      each call to it.  Setting this value greater than 1 reduces the
00317  *      amount of overhead spent in this system call. On a virtual memory
00318  *      machine, its good to allocate slightly less than a page worth of
00319  *      elements at a time (or some multiple thereof).
00320  *      [For the VAX, for real only use 41, otherwise use 31]
00321  *  MINIMUM_ALLOCATED_SIZE
00322  *      The minimum allocated size of a matrix.  Note that this does not
00323  *      limit the minimum size of a matrix.  This just prevents having to
00324  *      resize a matrix many times if the matrix is expandable, large and
00325  *      allocated with an estimated size of zero.  This number should not
00326  *      be less than one.
00327  *  EXPANSION_FACTOR
00328  *      The amount the allocated size of the matrix is increased when it
00329  *      is expanded.
00330  *  MAX_MARKOWITZ_TIES
00331  *      This number is used for two slightly different things, both of which
00332  *      relate to the search for the best pivot.  First, it is the maximum
00333  *      number of elements that are Markowitz tied that will be sifted
00334  *      through when trying to find the one that is numerically the best.
00335  *      Second, it creates an upper bound on how large a Markowitz product
00336  *      can be before it eliminates the possibility of early termination
00337  *      of the pivot search.  In other words, if the product of the smallest
00338  *      Markowitz product yet found and TIES_MULTIPLIER is greater than
00339  *      MAX_MARKOWITZ_TIES, then no early termination takes place.
00340  *      Set MAX_MARKOWITZ_TIES to some small value if no early termination of
00341  *      the pivot search is desired. An array of RealNumbers is allocated
00342  *      of size MAX_MARKOWITZ_TIES so it must be positive and shouldn't
00343  *      be too large.  Active when MODIFIED_MARKOWITZ is 1 (true).  [100]
00344  *  TIES_MULTIPLIER
00345  *      Specifies the number of Markowitz ties that are allowed to occur
00346  *      before the search for the pivot is terminated early.  Set to some
00347  *      large value if no early termination of the pivot search is desired.
00348  *      This number is multiplied times the Markowitz product to determine
00349  *      how many ties are required for early termination.  This means that
00350  *      more elements will be searched before early termination if a large
00351  *      number of fill-ins could be created by accepting what is currently
00352  *      considered the best choice for the pivot.  Active when
00353  *      MODIFIED_MARKOWITZ is 1 (true).  Setting this number to zero
00354  *      effectively eliminates all pivoting, which should be avoided.
00355  *      This number must be positive.  TIES_MULTIPLIER is also used when
00356  *      diagonal pivoting breaks down. [5]
00357  *  DEFAULT_PARTITION
00358  *      Which partition mode is used by spPartition() as default.
00359  *      Possibilities include
00360  *          spDIRECT_PARTITION  -- each row used direct addressing, best for
00361  *              a few relatively dense matrices.
00362  *          spINDIRECT_PARTITION  -- each row used indirect addressing, best
00363  *              for a few very sparse matrices.
00364  *          spAUTO_PARTITION  -- direct or indirect addressing is chosen on
00365  *              a row-by-row basis, carries a large overhead, but speeds up
00366  *              both dense and sparse matrices, best if there is a large
00367  *              number of matrices that can use the same ordering.
00368  */
00369 
00370 /* Begin constants. */
00371 #define  DEFAULT_THRESHOLD              1.0e-3
00372 #define  DIAG_PIVOTING_AS_DEFAULT       YES
00373 #define  SPACE_FOR_ELEMENTS             6
00374 #define  SPACE_FOR_FILL_INS             4
00375 #define  ELEMENTS_PER_ALLOCATION        31
00376 #define  MINIMUM_ALLOCATED_SIZE         6
00377 #define  EXPANSION_FACTOR               1.5
00378 #define  MAX_MARKOWITZ_TIES             100
00379 #define  TIES_MULTIPLIER                5
00380 #define  DEFAULT_PARTITION              spAUTO_PARTITION
00381 
00382 
00383 
00384 
00385 
00386 
00387 /*
00388  *  PRINTER WIDTH
00389  *
00390  *  This macro characterize the printer for the spPrint() routine.
00391  *
00392  *  >>> Macros:
00393  *  PRINTER_WIDTH
00394  *      The number of characters per page width.  Set to 80 for terminal,
00395  *      132 for line printer.
00396  */
00397 
00398 /*  Begin printer constants. */
00399 #define  PRINTER_WIDTH  80
00400 
00401 
00402 
00403 
00404 
00405 
00406 /*
00407  *  MACHINE CONSTANTS
00408  *
00409  *  These numbers must be updated when the program is ported to a new machine.
00410  */
00411 
00412 /* Begin machine constants. */
00413 
00414 #ifdef notdef /* __STDC__ */
00415 /*
00416  * This code is currently deleted because most ANSI standard C compilers
00417  * do not provide the standard header files yet.
00418  */
00419 #   include <limits.h>
00420 #   include <float.h>
00421 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00422 #   define  LARGEST_REAL            DBL_MAX
00423 #   define  SMALLEST_REAL           DBL_MIN
00424 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00425 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00426 #else /* NOT defined(__STDC__) */
00427 
00428 /* Apple MacOSX */ 
00429 
00430 #ifdef __APPLE__  /* __STDC__ */
00431 #   include <limits.h>
00432 #   include <float.h>
00433 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00434 #   define  LARGEST_REAL            DBL_MAX
00435 #   define  SMALLEST_REAL           DBL_MIN
00436 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00437 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00438 #endif /* NOT defined(__STDC__) */
00439 
00440 /* VAX machine constants */
00441 #if  (defined(vax) && !defined(netbsd)) 
00442 #   define  MACHINE_RESOLUTION      6.93889e-18
00443 #   define  LARGEST_REAL            1.70141e+38
00444 #   define  SMALLEST_REAL           2.938743e-39
00445 #   define  LARGEST_SHORT_INTEGER   32766
00446 #   define  LARGEST_LONG_INTEGER    2147483646
00447 #endif
00448 
00449 /* MIPS machine constants */
00450 #if (defined(mips) && !defined(netbsd)) 
00451 #   define  MACHINE_RESOLUTION      6.93889e-18
00452 #   define  LARGEST_REAL            1.70141e+38
00453 #   define  SMALLEST_REAL           2.938743e-39
00454 #   define  LARGEST_SHORT_INTEGER   32766
00455 #   define  LARGEST_LONG_INTEGER    2147483646
00456 #endif
00457 
00458 
00459 /* hp9000 machine constants */
00460 #ifdef hpux
00461 /* These values are correct for hp9000/300.  Should be correct for others. */
00462 #   define  MACHINE_RESOLUTION      8.9e-15
00463 #   define  LARGEST_REAL            1.79769313486231e+308
00464 #   define  SMALLEST_REAL           2.22507385850721e-308
00465 #   define  LARGEST_SHORT_INTEGER   32766
00466 #   define  LARGEST_LONG_INTEGER    2147483646
00467 #endif
00468 
00469 /* IBM machine constants */
00470 #ifdef aix
00471 
00472 #   define  MACHINE_RESOLUTION      2.2204460492503131e-16   
00473 #   define  LARGEST_REAL            1.7976931348623158e+308  
00474 #   define  SMALLEST_REAL           2.2250738585072014e-308
00475 #   define  LARGEST_SHORT_INTEGER   32767
00476 #   define  LARGEST_LONG_INTEGER    2147483647
00477 #endif
00478 
00479 /* Sun machine constants */
00480 #if (defined(sun) && !defined(netbsd))
00481 /* These values are rumored to be the correct values. */
00482 #   define  MACHINE_RESOLUTION      8.9e-15
00483 #   define  LARGEST_REAL            1.79769313486231e+308
00484 #   define  SMALLEST_REAL           2.22507385850721e-308
00485 #   define  LARGEST_SHORT_INTEGER   32766
00486 #   define  LARGEST_LONG_INTEGER    2147483646
00487 #endif
00488 /* DEC alpha machine constant*/
00489 #if (defined(__alpha) && !defined(netbsd)) 
00490 #   include <limits.h>
00491 #   include <float.h>
00492 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00493 #   define  LARGEST_REAL            DBL_MAX
00494 #   define  SMALLEST_REAL           DBL_MIN
00495 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00496 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00497 #endif
00498 #ifdef linux
00499 #   include <limits.h>
00500 #   include <float.h>
00501 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00502 #   define  LARGEST_REAL            DBL_MAX
00503 #   define  SMALLEST_REAL           DBL_MIN
00504 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00505 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00506 #endif
00507 #if defined(netbsd) || defined(freebsd)
00508 #   include <limits.h>
00509 #   include <float.h>
00510 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00511 #   define  LARGEST_REAL            DBL_MAX
00512 #   define  SMALLEST_REAL           DBL_MIN
00513 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00514 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00515 #endif
00516 #ifdef _MSC_VER 
00517 #   include <limits.h>
00518 #   include <float.h>
00519 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00520 #   define  LARGEST_REAL            DBL_MAX
00521 #   define  SMALLEST_REAL           DBL_MIN
00522 /* XXXXX : a v'erifier */ 
00523 #   define  LARGEST_SHORT_INTEGER   32766
00524 #   define  LARGEST_LONG_INTEGER    2147483646
00525 #endif
00526 #if defined(__MWERKS__)||defined(THINK_C)
00527 #   include <limits.h>
00528 #   include <float.h>
00529 #   define  MACHINE_RESOLUTION      DBL_EPSILON
00530 #   define  LARGEST_REAL            DBL_MAX
00531 #   define  SMALLEST_REAL           DBL_MIN
00532 #   define  LARGEST_SHORT_INTEGER   SHRT_MAX
00533 #   define  LARGEST_LONG_INTEGER    LONG_MAX
00534 #endif
00535 
00536 #endif /* NOT defined(__STDC__) */
00537 
00538 
00539 
00540 
00541 
00542 
00543 /*
00544  *  ANNOTATION
00545  *
00546  *  This macro changes the amount of annotation produced by the matrix
00547  *  routines.  The annotation is used as a debugging aid.  Change the number
00548  *  associated with ANNOTATE to change the amount of annotation produced by
00549  *  the program.
00550  */
00551 
00552 /* Begin annotation definitions. */
00553 #define  ANNOTATE               NONE
00554 
00555 #define  NONE                   0
00556 #define  ON_STRANGE_BEHAVIOR    1
00557 #define  FULL                   2
00558 
00559 #endif /* spINSIDE_SPARSE */
00560 
00561 #endif /* spCONFIG_DEFS */
00562 
00563 
00564 

Generated on Sun Mar 4 15:04:00 2007 for Scilab [trunk] by  doxygen 1.5.1