IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4162 for trunk/psLib/src/math


Ignore:
Timestamp:
Jun 8, 2005, 1:40:46 PM (21 years ago)
Author:
desonia
Message:

added comments on the end of #endif and #else

Location:
trunk/psLib/src/math
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psBinaryOp.h

    r3182 r4162  
    1 
    21/** @file  psBinaryOp.h
    32 *
     
    3130 *  @author Robert DeSonia, MHPCC
    3231 *
    33  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    34  *  @date $Date: 2005-02-10 02:36:41 $
     32 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-06-08 23:40:45 $
    3534 *
    3635 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6564/// @}
    6665
    67 #endif
     66#endif // #ifndef PSBINARY_OP_H
  • trunk/psLib/src/math/psCompare.h

    r3264 r4162  
    66 *  @ingroup Compare
    77 *
    8  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-02-17 19:26:23 $
     8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-06-08 23:40:45 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1212 */
    1313
    14 #if !defined(PS_COMPARE_H)
     14#ifndef PS_COMPARE_H
    1515#define PS_COMPARE_H
    1616
     
    2424 *  e.g., for psList of pointers to numeric values.
    2525 *
    26  *  @return int      an integer less than, equal to, or greater than zero if 
    27  *                   the first argument is considered to be respectively less 
    28  *                   than, equal to, or greater than the second. 
     26 *  @return int      an integer less than, equal to, or greater than zero if
     27 *                   the first argument is considered to be respectively less
     28 *                   than, equal to, or greater than the second.
    2929 */
    3030typedef int (*psComparePtrFcn) (
     
    3535/** A comparison function for sorting.
    3636 *
    37  *  @return int      an integer less than, equal to, or greater than zero if 
    38  *                   the first argument is considered to be respectively less 
    39  *                   than, equal to, or greater than the second. 
     37 *  @return int      an integer less than, equal to, or greater than zero if
     38 *                   the first argument is considered to be respectively less
     39 *                   than, equal to, or greater than the second.
    4040 */
    4141typedef int (*psCompareFcn) (
     
    4646/** Compare function of psS8 data.  For use with psListSort.
    4747 *
    48  *  @return int      an integer less than, equal to, or greater than zero if 
    49  *                   the first argument is considered to be respectively less 
    50  *                   than, equal to, or greater than the second. 
     48 *  @return int      an integer less than, equal to, or greater than zero if
     49 *                   the first argument is considered to be respectively less
     50 *                   than, equal to, or greater than the second.
    5151 */
    5252int psCompareS8Ptr(
     
    5757/** Compare function of psS16 data.  For use with psListSort.
    5858 *
    59  *  @return int      an integer less than, equal to, or greater than zero if 
    60  *                   the first argument is considered to be respectively less 
    61  *                   than, equal to, or greater than the second. 
     59 *  @return int      an integer less than, equal to, or greater than zero if
     60 *                   the first argument is considered to be respectively less
     61 *                   than, equal to, or greater than the second.
    6262 */
    6363int psCompareS16Ptr(
     
    6868/** Compare function of psS32 data.  For use with psListSort.
    6969 *
    70  *  @return int      an integer less than, equal to, or greater than zero if 
    71  *                   the first argument is considered to be respectively less 
    72  *                   than, equal to, or greater than the second. 
     70 *  @return int      an integer less than, equal to, or greater than zero if
     71 *                   the first argument is considered to be respectively less
     72 *                   than, equal to, or greater than the second.
    7373 */
    7474int psCompareS32Ptr(
     
    7979/** Compare function of psS64 data.  For use with psListSort.
    8080 *
    81  *  @return int      an integer less than, equal to, or greater than zero if 
    82  *                   the first argument is considered to be respectively less 
    83  *                   than, equal to, or greater than the second. 
     81 *  @return int      an integer less than, equal to, or greater than zero if
     82 *                   the first argument is considered to be respectively less
     83 *                   than, equal to, or greater than the second.
    8484 */
    8585int psCompareS64Ptr(
     
    9090/** Compare function of psU8 data.  For use with psListSort.
    9191 *
    92  *  @return int      an integer less than, equal to, or greater than zero if 
    93  *                   the first argument is considered to be respectively less 
    94  *                   than, equal to, or greater than the second. 
     92 *  @return int      an integer less than, equal to, or greater than zero if
     93 *                   the first argument is considered to be respectively less
     94 *                   than, equal to, or greater than the second.
    9595 */
    9696int psCompareU8Ptr(
     
    101101/** Compare function of psU16 data.  For use with psListSort.
    102102 *
    103  *  @return int      an integer less than, equal to, or greater than zero if 
    104  *                   the first argument is considered to be respectively less 
    105  *                   than, equal to, or greater than the second. 
     103 *  @return int      an integer less than, equal to, or greater than zero if
     104 *                   the first argument is considered to be respectively less
     105 *                   than, equal to, or greater than the second.
    106106 */
    107107int psCompareU16Ptr(
     
    112112/** Compare function of psU32 data.  For use with psListSort.
    113113 *
    114  *  @return int      an integer less than, equal to, or greater than zero if 
    115  *                   the first argument is considered to be respectively less 
    116  *                   than, equal to, or greater than the second. 
     114 *  @return int      an integer less than, equal to, or greater than zero if
     115 *                   the first argument is considered to be respectively less
     116 *                   than, equal to, or greater than the second.
    117117 */
    118118int psCompareU32Ptr(
     
    123123/** Compare function of psU64 data.  For use with psListSort.
    124124 *
    125  *  @return int      an integer less than, equal to, or greater than zero if 
    126  *                   the first argument is considered to be respectively less 
    127  *                   than, equal to, or greater than the second. 
     125 *  @return int      an integer less than, equal to, or greater than zero if
     126 *                   the first argument is considered to be respectively less
     127 *                   than, equal to, or greater than the second.
    128128 */
    129129int psCompareU64Ptr(
     
    134134/** Compare function of psF32 data.  For use with psListSort.
    135135 *
    136  *  @return int      an integer less than, equal to, or greater than zero if 
    137  *                   the first argument is considered to be respectively less 
    138  *                   than, equal to, or greater than the second. 
     136 *  @return int      an integer less than, equal to, or greater than zero if
     137 *                   the first argument is considered to be respectively less
     138 *                   than, equal to, or greater than the second.
    139139 */
    140140int psCompareF32Ptr(
     
    145145/** Compare function of psF64 data.  For use with psListSort.
    146146 *
    147  *  @return int      an integer less than, equal to, or greater than zero if 
    148  *                   the first argument is considered to be respectively less 
    149  *                   than, equal to, or greater than the second. 
     147 *  @return int      an integer less than, equal to, or greater than zero if
     148 *                   the first argument is considered to be respectively less
     149 *                   than, equal to, or greater than the second.
    150150 */
    151151int psCompareF64Ptr(
     
    156156/** Compare function of psS8 data.  For use with psListSort for descending ordering.
    157157 *
    158  *  @return int      an integer less than, equal to, or greater than zero if 
    159  *                   the first argument is considered to be respectively greater 
    160  *                   than, equal to, or less than the second. 
     158 *  @return int      an integer less than, equal to, or greater than zero if
     159 *                   the first argument is considered to be respectively greater
     160 *                   than, equal to, or less than the second.
    161161 */
    162162int psCompareDescendingS8Ptr(
     
    167167/** Compare function of psS16 data.  For use with psListSort for descending ordering.
    168168 *
    169  *  @return int      an integer less than, equal to, or greater than zero if 
    170  *                   the first argument is considered to be respectively greater 
    171  *                   than, equal to, or less than the second. 
     169 *  @return int      an integer less than, equal to, or greater than zero if
     170 *                   the first argument is considered to be respectively greater
     171 *                   than, equal to, or less than the second.
    172172 */
    173173int psCompareDescendingS16Ptr(
     
    178178/** Compare function of psS32 data.  For use with psListSort for descending ordering.
    179179 *
    180  *  @return int      an integer less than, equal to, or greater than zero if 
    181  *                   the first argument is considered to be respectively greater 
    182  *                   than, equal to, or less than the second. 
     180 *  @return int      an integer less than, equal to, or greater than zero if
     181 *                   the first argument is considered to be respectively greater
     182 *                   than, equal to, or less than the second.
    183183 */
    184184int psCompareDescendingS32Ptr(
     
    189189/** Compare function of psS64 data.  For use with psListSort for descending ordering.
    190190 *
    191  *  @return int      an integer less than, equal to, or greater than zero if 
    192  *                   the first argument is considered to be respectively greater 
    193  *                   than, equal to, or less than the second. 
     191 *  @return int      an integer less than, equal to, or greater than zero if
     192 *                   the first argument is considered to be respectively greater
     193 *                   than, equal to, or less than the second.
    194194 */
    195195int psCompareDescendingS64Ptr(
     
    200200/** Compare function of psU8 data.  For use with psListSort for descending ordering.
    201201 *
    202  *  @return int      an integer less than, equal to, or greater than zero if 
    203  *                   the first argument is considered to be respectively greater 
    204  *                   than, equal to, or less than the second. 
     202 *  @return int      an integer less than, equal to, or greater than zero if
     203 *                   the first argument is considered to be respectively greater
     204 *                   than, equal to, or less than the second.
    205205 */
    206206int psCompareDescendingU8Ptr(
     
    211211/** Compare function of psU16 data.  For use with psListSort for descending ordering.
    212212 *
    213  *  @return int      an integer less than, equal to, or greater than zero if 
    214  *                   the first argument is considered to be respectively greater 
    215  *                   than, equal to, or less than the second. 
     213 *  @return int      an integer less than, equal to, or greater than zero if
     214 *                   the first argument is considered to be respectively greater
     215 *                   than, equal to, or less than the second.
    216216 */
    217217int psCompareDescendingU16Ptr(
     
    222222/** Compare function of psU32 data.  For use with psListSort for descending ordering.
    223223 *
    224  *  @return int      an integer less than, equal to, or greater than zero if 
    225  *                   the first argument is considered to be respectively greater 
    226  *                   than, equal to, or lessg than the second. 
     224 *  @return int      an integer less than, equal to, or greater than zero if
     225 *                   the first argument is considered to be respectively greater
     226 *                   than, equal to, or lessg than the second.
    227227 */
    228228int psCompareDescendingU32Ptr(
     
    233233/** Compare function of psU64 data.  For use with psListSort for descending ordering.
    234234 *
    235  *  @return int      an integer less than, equal to, or greater than zero if 
    236  *                   the first argument is considered to be respectively greater 
    237  *                   than, equal to, or lessg than the second. 
     235 *  @return int      an integer less than, equal to, or greater than zero if
     236 *                   the first argument is considered to be respectively greater
     237 *                   than, equal to, or lessg than the second.
    238238 */
    239239int psCompareDescendingU64Ptr(
     
    244244/** Compare function of psF32 data.  For use with psListSort for descending ordering.
    245245 *
    246  *  @return int      an integer less than, equal to, or greater than zero if 
    247  *                   the first argument is considered to be respectively greater 
    248  *                   than, equal to, or lessg than the second. 
     246 *  @return int      an integer less than, equal to, or greater than zero if
     247 *                   the first argument is considered to be respectively greater
     248 *                   than, equal to, or lessg than the second.
    249249 */
    250250int psCompareDescendingF32Ptr(
     
    255255/** Compare function of psF64 data.  For use with psListSort for descending ordering.
    256256 *
    257  *  @return int      an integer less than, equal to, or greater than zero if 
    258  *                   the first argument is considered to be respectively greater 
    259  *                   than, equal to, or lessg than the second. 
     257 *  @return int      an integer less than, equal to, or greater than zero if
     258 *                   the first argument is considered to be respectively greater
     259 *                   than, equal to, or lessg than the second.
    260260 */
    261261int psCompareDescendingF64Ptr(
     
    266266/** Compare function of psS8 data.
    267267 *
    268  *  @return int      an integer less than, equal to, or greater than zero if 
    269  *                   the first argument is considered to be respectively less 
    270  *                   than, equal to, or greater than the second. 
     268 *  @return int      an integer less than, equal to, or greater than zero if
     269 *                   the first argument is considered to be respectively less
     270 *                   than, equal to, or greater than the second.
    271271 */
    272272int psCompareS8(
     
    278278/** Compare function of psS16 data.
    279279 *
    280  *  @return int      an integer less than, equal to, or greater than zero if 
    281  *                   the first argument is considered to be respectively less 
    282  *                   than, equal to, or greater than the second. 
     280 *  @return int      an integer less than, equal to, or greater than zero if
     281 *                   the first argument is considered to be respectively less
     282 *                   than, equal to, or greater than the second.
    283283 */
    284284int psCompareS16(
     
    290290/** Compare function of psS32 data.
    291291 *
    292  *  @return int      an integer less than, equal to, or greater than zero if 
    293  *                   the first argument is considered to be respectively less 
    294  *                   than, equal to, or greater than the second. 
     292 *  @return int      an integer less than, equal to, or greater than zero if
     293 *                   the first argument is considered to be respectively less
     294 *                   than, equal to, or greater than the second.
    295295 */
    296296int psCompareS32(
     
    302302/** Compare function of psS64 data.
    303303 *
    304  *  @return int      an integer less than, equal to, or greater than zero if 
    305  *                   the first argument is considered to be respectively less 
    306  *                   than, equal to, or greater than the second. 
     304 *  @return int      an integer less than, equal to, or greater than zero if
     305 *                   the first argument is considered to be respectively less
     306 *                   than, equal to, or greater than the second.
    307307 */
    308308int psCompareS64(
     
    314314/** Compare function of psU8 data.
    315315 *
    316  *  @return int      an integer less than, equal to, or greater than zero if 
    317  *                   the first argument is considered to be respectively less 
    318  *                   than, equal to, or greater than the second. 
     316 *  @return int      an integer less than, equal to, or greater than zero if
     317 *                   the first argument is considered to be respectively less
     318 *                   than, equal to, or greater than the second.
    319319 */
    320320int psCompareU8(
     
    326326/** Compare function of psU16 data.
    327327 *
    328  *  @return int      an integer less than, equal to, or greater than zero if 
    329  *                   the first argument is considered to be respectively less 
    330  *                   than, equal to, or greater than the second. 
     328 *  @return int      an integer less than, equal to, or greater than zero if
     329 *                   the first argument is considered to be respectively less
     330 *                   than, equal to, or greater than the second.
    331331 */
    332332int psCompareU16(
     
    338338/** Compare function of psU32 data.
    339339 *
    340  *  @return int      an integer less than, equal to, or greater than zero if 
    341  *                   the first argument is considered to be respectively less 
    342  *                   than, equal to, or greater than the second. 
     340 *  @return int      an integer less than, equal to, or greater than zero if
     341 *                   the first argument is considered to be respectively less
     342 *                   than, equal to, or greater than the second.
    343343 */
    344344int psCompareU32(
     
    350350/** Compare function of psU64 data.
    351351 *
    352  *  @return int      an integer less than, equal to, or greater than zero if 
    353  *                   the first argument is considered to be respectively less 
    354  *                   than, equal to, or greater than the second. 
     352 *  @return int      an integer less than, equal to, or greater than zero if
     353 *                   the first argument is considered to be respectively less
     354 *                   than, equal to, or greater than the second.
    355355 */
    356356int psCompareU64(
     
    362362/** Compare function of psF32 data.
    363363 *
    364  *  @return int      an integer less than, equal to, or greater than zero if 
    365  *                   the first argument is considered to be respectively less 
    366  *                   than, equal to, or greater than the second. 
     364 *  @return int      an integer less than, equal to, or greater than zero if
     365 *                   the first argument is considered to be respectively less
     366 *                   than, equal to, or greater than the second.
    367367 */
    368368int psCompareF32(
     
    374374/** Compare function of psF64 data.
    375375 *
    376  *  @return int      an integer less than, equal to, or greater than zero if 
    377  *                   the first argument is considered to be respectively less 
    378  *                   than, equal to, or greater than the second. 
     376 *  @return int      an integer less than, equal to, or greater than zero if
     377 *                   the first argument is considered to be respectively less
     378 *                   than, equal to, or greater than the second.
    379379 */
    380380int psCompareF64(
     
    386386/** Compare function of psS8 data.
    387387 *
    388  *  @return int      an integer less than, equal to, or greater than zero if 
    389  *                   the first argument is considered to be respectively greater 
    390  *                   than, equal to, or less than the second. 
     388 *  @return int      an integer less than, equal to, or greater than zero if
     389 *                   the first argument is considered to be respectively greater
     390 *                   than, equal to, or less than the second.
    391391 */
    392392int psCompareDescendingS8(
     
    398398/** Compare function of psS16 data.
    399399 *
    400  *  @return int      an integer less than, equal to, or greater than zero if 
    401  *                   the first argument is considered to be respectively greater 
    402  *                   than, equal to, or less than the second. 
     400 *  @return int      an integer less than, equal to, or greater than zero if
     401 *                   the first argument is considered to be respectively greater
     402 *                   than, equal to, or less than the second.
    403403 */
    404404int psCompareDescendingS16(
     
    410410/** Compare function of psS32 data.
    411411 *
    412  *  @return int      an integer less than, equal to, or greater than zero if 
    413  *                   the first argument is considered to be respectively greater 
    414  *                   than, equal to, or less than the second. 
     412 *  @return int      an integer less than, equal to, or greater than zero if
     413 *                   the first argument is considered to be respectively greater
     414 *                   than, equal to, or less than the second.
    415415 */
    416416int psCompareDescendingS32(
     
    422422/** Compare function of psS64 data.
    423423 *
    424  *  @return int      an integer less than, equal to, or greater than zero if 
    425  *                   the first argument is considered to be respectively greater 
    426  *                   than, equal to, or less than the second. 
     424 *  @return int      an integer less than, equal to, or greater than zero if
     425 *                   the first argument is considered to be respectively greater
     426 *                   than, equal to, or less than the second.
    427427 */
    428428int psCompareDescendingS64(
     
    434434/** Compare function of psU8 data.
    435435 *
    436  *  @return int      an integer less than, equal to, or greater than zero if 
    437  *                   the first argument is considered to be respectively greater 
    438  *                   than, equal to, or less than the second. 
     436 *  @return int      an integer less than, equal to, or greater than zero if
     437 *                   the first argument is considered to be respectively greater
     438 *                   than, equal to, or less than the second.
    439439 */
    440440int psCompareDescendingU8(
     
    446446/** Compare function of psU16 data.
    447447 *
    448  *  @return int      an integer less than, equal to, or greater than zero if 
    449  *                   the first argument is considered to be respectively greater 
    450  *                   than, equal to, or less than the second. 
     448 *  @return int      an integer less than, equal to, or greater than zero if
     449 *                   the first argument is considered to be respectively greater
     450 *                   than, equal to, or less than the second.
    451451 */
    452452int psCompareDescendingU16(
     
    458458/** Compare function of psU32 data.
    459459 *
    460  *  @return int      an integer less than, equal to, or greater than zero if 
    461  *                   the first argument is considered to be respectively greater 
    462  *                   than, equal to, or less than the second. 
     460 *  @return int      an integer less than, equal to, or greater than zero if
     461 *                   the first argument is considered to be respectively greater
     462 *                   than, equal to, or less than the second.
    463463 */
    464464int psCompareDescendingU32(
     
    470470/** Compare function of psU64 data.
    471471 *
    472  *  @return int      an integer less than, equal to, or greater than zero if 
    473  *                   the first argument is considered to be respectively greater 
    474  *                   than, equal to, or less than the second. 
     472 *  @return int      an integer less than, equal to, or greater than zero if
     473 *                   the first argument is considered to be respectively greater
     474 *                   than, equal to, or less than the second.
    475475 */
    476476int psCompareDescendingU64(
     
    482482/** Compare function of psF32 data.
    483483 *
    484  *  @return int      an integer less than, equal to, or greater than zero if 
    485  *                   the first argument is considered to be respectively greater 
    486  *                   than, equal to, or less than the second. 
     484 *  @return int      an integer less than, equal to, or greater than zero if
     485 *                   the first argument is considered to be respectively greater
     486 *                   than, equal to, or less than the second.
    487487 */
    488488int psCompareDescendingF32(
     
    494494/** Compare function of psF64 data.
    495495 *
    496  *  @return int      an integer less than, equal to, or greater than zero if 
    497  *                   the first argument is considered to be respectively greater 
    498  *                   than, equal to, or less than the second. 
     496 *  @return int      an integer less than, equal to, or greater than zero if
     497 *                   the first argument is considered to be respectively greater
     498 *                   than, equal to, or less than the second.
    499499 */
    500500int psCompareDescendingF64(
     
    506506/// @}
    507507
    508 #endif
     508#endif  // #ifndef PS_COMPARE_H
  • trunk/psLib/src/math/psConstants.h

    r4108 r4162  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-06-04 00:49:48 $
     8 *  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-06-08 23:40:45 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4545#define M_1_PI 0.3183098861837906715377675267450287  /* 1/pi */
    4646#define M_2_PI 0.6366197723675813430755350534900574  /* 2/pi */
    47 #endif
    48 #define PS_PI   3.1415926535897932384626433832795029  /* pi */
     47#endif // #ifndef M_PI
    4948
    5049#define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
     
    699698 *****************************************************************************/
    700699#define PS_MAX(A, B) \
    701 (((A) > (B)) ? (A) : (B)) \
     700(((A) > (B)) ? (A) : (B))
    702701
    703702#define PS_MIN(A, B) \
    704 (((A) < (B)) ? (A) : (B)) \
     703(((A) < (B)) ? (A) : (B))
    705704
    706705#define PS_SQR(A) \
    707 ((A) * (A)) \
    708 
    709 #ifdef DARWIN
    710 #define PS_SQRT_F32(A) ((float) sqrt(A))
    711 #else
    712 #define PS_SQRT_F32(A) (sqrtf(A))
    713 #endif
     706((A) * (A))
  • trunk/psLib/src/math/psMatrix.h

    r3264 r4162  
    1 
    21/** @file  psMatrix.h
    32 *
     
    2221 *  @author Ross Harman, MHPCC
    2322 *
    24  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2005-02-17 19:26:23 $
     23 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2005-06-08 23:40:45 $
    2625 *
    2726 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    164163/// @}
    165164
    166 #endif
     165#endif // #ifndef PSMATRIX_H
  • trunk/psLib/src/math/psMinimize.h

    r3855 r4162  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-05-05 22:23:29 $
     10 *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-06-08 23:40:45 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1515 */
    1616
    17 #if !defined(PS_MINIMIZE_H)
     17#ifndef PS_MINIMIZE_H
    1818#define PS_MINIMIZE_H
    1919
     
    5353/** Derive a polynomial fit.
    5454 *
    55  *  psVectorFitPolynomial1d returns the polynomial that best fits the 
    56  *  observations. The input parameters are a polynomial that specifies the 
    57  *  fit order, myPoly, which will be altered and returned with the best-fit 
    58  *  coefficients; and the observations, x, y and yErr. The independent 
    59  *  variable list, x may be NULL, in which case the vector index is used. 
    60  *  The dependent variable error, yErr may be null, in which case the solution 
    61  *  is determined in the assumption that all data errors are equal. This 
     55 *  psVectorFitPolynomial1d returns the polynomial that best fits the
     56 *  observations. The input parameters are a polynomial that specifies the
     57 *  fit order, myPoly, which will be altered and returned with the best-fit
     58 *  coefficients; and the observations, x, y and yErr. The independent
     59 *  variable list, x may be NULL, in which case the vector index is used.
     60 *  The dependent variable error, yErr may be null, in which case the solution
     61 *  is determined in the assumption that all data errors are equal. This
    6262 *  function must be valid only for types psF32, psF64.
    6363 *
     
    142142/* \} */// End of MathGroup Functions
    143143
    144 #endif
     144#endif // #ifndef PS_MINIMIZE_H
    145145
  • trunk/psLib/src/math/psPolynomial.c

    r4029 r4162  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-05-25 20:26:55 $
     9 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-08 23:40:45 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10241024
    10251025    if (normal == true) {
    1026         tmp = 1.0 / PS_SQRT_F32(2.0 * M_PI * (sigma * sigma));
     1026        tmp = 1.0 / sqrtf(2.0 * M_PI * (sigma * sigma));
    10271027    }
    10281028
  • trunk/psLib/src/math/psPolynomial.h

    r3598 r4162  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-03-31 23:01:46 $
     14 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-08 23:40:45 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1818 */
    1919
    20 #if !defined(PS_FUNCTIONS_H)
     20#ifndef PS_FUNCTIONS_H
    2121#define PS_FUNCTIONS_H
    2222
     
    3434
    3535/** Evaluate a non-normalized Gaussian with the given mean and sigma at the
    36  *  given coordianate. 
    37  *
    38  *  Note that this is not a Gaussian deviate.  The evaluated Gaussian is: 
    39  *        \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 
     36 *  given coordianate.
     37 *
     38 *  Note that this is not a Gaussian deviate.  The evaluated Gaussian is:
     39 *        \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f]
    4040 *
    4141 *  @return psF32      value on the gaussian curve given the input parameters
     
    4949
    5050/** Produce a vector of random numbers from a Gaussian distribution with
    51  *  the specified mean and sigma 
    52  * 
     51 *  the specified mean and sigma
     52 *
    5353 *  @return psVector*    vector of random numbers
    54  * 
     54 *
    5555 */
    5656psVector* p_psGaussianDev(
     
    433433                         const psVector* y,
    434434                         psF32 X);
    435 #endif
    436 
    437 /* \} */// End of MathGroup Functions
    438 
    439 #endif
    440 
     435#endif // #if 0
     436
     437/** \} */ // End of MathGroup Functions
     438
     439#endif // #ifndef PS_FUNCTIONS_H
     440
  • trunk/psLib/src/math/psRandom.h

    r3264 r4162  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-02-17 19:26:23 $
     12*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-06-08 23:40:45 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1616*/
    1717
    18 #if !defined(PS_RANDOM_H)
     18#ifndef PS_RANDOM_H
    1919#define PS_RANDOM_H
    2020
     
    5656/* \} */// End of MathGroup Functions
    5757
    58 #endif
    59 
     58#endif // #ifndef PS_RANDOM_H
  • trunk/psLib/src/math/psSpline.c

    r4029 r4162  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-05-25 20:26:55 $
     9 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-08 23:40:45 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    10241024
    10251025    if (normal == true) {
    1026         tmp = 1.0 / PS_SQRT_F32(2.0 * M_PI * (sigma * sigma));
     1026        tmp = 1.0 / sqrtf(2.0 * M_PI * (sigma * sigma));
    10271027    }
    10281028
  • trunk/psLib/src/math/psSpline.h

    r3598 r4162  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-03-31 23:01:46 $
     14 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-06-08 23:40:45 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1818 */
    1919
    20 #if !defined(PS_FUNCTIONS_H)
     20#ifndef PS_FUNCTIONS_H
    2121#define PS_FUNCTIONS_H
    2222
     
    3434
    3535/** Evaluate a non-normalized Gaussian with the given mean and sigma at the
    36  *  given coordianate. 
    37  *
    38  *  Note that this is not a Gaussian deviate.  The evaluated Gaussian is: 
    39  *        \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 
     36 *  given coordianate.
     37 *
     38 *  Note that this is not a Gaussian deviate.  The evaluated Gaussian is:
     39 *        \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f]
    4040 *
    4141 *  @return psF32      value on the gaussian curve given the input parameters
     
    4949
    5050/** Produce a vector of random numbers from a Gaussian distribution with
    51  *  the specified mean and sigma 
    52  * 
     51 *  the specified mean and sigma
     52 *
    5353 *  @return psVector*    vector of random numbers
    54  * 
     54 *
    5555 */
    5656psVector* p_psGaussianDev(
     
    433433                         const psVector* y,
    434434                         psF32 X);
    435 #endif
    436 
    437 /* \} */// End of MathGroup Functions
    438 
    439 #endif
    440 
     435#endif // #if 0
     436
     437/** \} */ // End of MathGroup Functions
     438
     439#endif // #ifndef PS_FUNCTIONS_H
     440
  • trunk/psLib/src/math/psStats.c

    r4138 r4162  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.131 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-07 23:11:54 $
     16 *  @version $Revision: 1.132 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-08 23:40:45 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    878878    } else {
    879879        countFloat = (psF32)countInt;
    880         stats->sampleStdev = PS_SQRT_F32((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
     880        stats->sampleStdev = sqrtf((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
    881881    }
    882882}
     
    992992        // data ranges are used correctly.
    993993        if (errors != NULL) {
    994             stats->sampleStdev = (1.0 / PS_SQRT_F32(errorDivisor));
     994            stats->sampleStdev = (1.0 / sqrtf(errorDivisor));
    995995        } else {
    996996            countFloat = (psF32)countInt;
    997             stats->sampleStdev = PS_SQRT_F32((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
     997            stats->sampleStdev = sqrtf((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
    998998
    999999        }
     
    16271627        }
    16281628    }
    1629     myStdev = PS_SQRT_F32((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
     1629    myStdev = sqrtf((sumSquares - (sumDiffs * sumDiffs / countFloat)) / (countFloat - 1));
    16301630
    16311631    p_psNormalizeVectorRangeF32(robustHistogramVector, 0.0, 1.0);
     
    16571657                     "WARNING: failed fit a 1D polynomial.\n");
    16581658        }
    1659         psF32 polyFitSigma = PS_SQRT_F32(-0.5 / tmpPoly->coeff[2]);
     1659        psF32 polyFitSigma = sqrtf(-0.5 / tmpPoly->coeff[2]);
    16601660        psF32 polyFitMean = tmpPoly->coeff[1] * PS_SQR(polyFitSigma);
    16611661        // psF32 polyFitNorm = exp(tmpPoly->coedd[0] + PS_SQR(polyFitMean) / (2.0 * PS_SQR(polyFitSigma)));
  • trunk/psLib/src/math/psStats.h

    r4138 r4162  
    1414 *  @author GLG, MHPCC
    1515 *
    16  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-07 23:11:54 $
     16 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-06-08 23:40:45 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    2020 */
    21 #if !defined(PS_STATS_H)
     21#ifndef PS_STATS_H
    2222#define PS_STATS_H
    2323
     
    112112/** The basic histogram structure which contains bounds and bins.
    113113 *
    114  *  In this structure, the vector bounds specifies the boundaries of the 
    115  *  histogram bins, and must of type psF32, while nums specifies the number 
    116  *  of entries in the bin, and must of type psU32. The value of bounds.n must 
    117  *  therefore be 1 greater than than nums.n. The two values minNum and maxNum 
    118  *  are the number of data values which fell below the lower limit bound or 
     114 *  In this structure, the vector bounds specifies the boundaries of the
     115 *  histogram bins, and must of type psF32, while nums specifies the number
     116 *  of entries in the bin, and must of type psU32. The value of bounds.n must
     117 *  therefore be 1 greater than than nums.n. The two values minNum and maxNum
     118 *  are the number of data values which fell below the lower limit bound or
    119119 *  above the upper limit bound, respectively.
    120120 */
     
    130130
    131131/** Allocator for psHistogram where the bounds of the bins are implicitly
    132  *  specified through simply specifying an upper and lower limit along with 
    133  *  the size of the bins. 
     132 *  specified through simply specifying an upper and lower limit along with
     133 *  the size of the bins.
    134134 *
    135135 *  @return psHistogram*    Newly allocated psHistogram
     
    142142
    143143/** Allocator for psHistogram where the bounds of the bins are explicitly
    144  *  specified. 
     144 *  specified.
    145145 *
    146146 *  @return psHistogram*    Newly allocated psHistogram
     
    152152/** Calculate a histogram
    153153 *
    154  *  The following function populates the histogram bins from the specified 
     154 *  The following function populates the histogram bins from the specified
    155155 *  vector (in). It alters and returns the histogram out structure. The input
    156156 *  vector may be of types psU8, psU16, psF32, psF64.
     
    169169 *
    170170 *  @return psBool    If more than one statistic result is set in stats->options,
    171  *                    false is returned and the value parameter is not set, 
     171 *                    false is returned and the value parameter is not set,
    172172 *                    otherwise true is returned.
    173173 */
     
    193193/// @}
    194194
    195 #endif
     195#endif // #ifndef PS_STATS_H
  • trunk/psLib/src/math/psUnaryOp.h

    r3182 r4162  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2005-02-10 02:36:41 $
     32 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2005-06-08 23:40:45 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6767/// @}
    6868
    69 #endif
     69#endif // #ifndef PSUNARY_OP_H
Note: See TracChangeset for help on using the changeset viewer.