IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMinimizeLMM.c

    r9556 r9730  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-10-14 00:15:47 $
     12 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-24 22:52:56 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    163163    psImage  *Alpha  = psImageAlloc (params->n, params->n, PS_TYPE_F64);
    164164    psVector *beta   = psVectorAlloc(params->n, PS_TYPE_F64);
    165     beta->n = beta->nalloc;
    166165    psVector *Params = psVectorAlloc(params->n, PS_TYPE_F64);
    167     Params->n = Params->nalloc;
    168166    psVector *dy     = NULL;
    169167    psBool rc = true;
     
    175173    } else {
    176174        dy = psVectorAlloc(y->n, PS_TYPE_F32);
    177         dy->n = dy->nalloc;
    178175        psVectorInit(dy, 1.0);
    179176    }
     
    246243    psF64 ymodel;
    247244    psVector *deriv = psVectorAlloc(params->n, PS_TYPE_F32);
    248     deriv->n = deriv->nalloc;
    249245
    250246    // zero alpha and beta for summing below
     
    380376    psImage *Alpha   = psImageAlloc(params->n, params->n, PS_TYPE_F64);
    381377    psVector *beta   = psVectorAlloc(params->n, PS_TYPE_F64);
    382     beta->n = beta->nalloc;
    383378    psVector *Beta   = psVectorAlloc(params->n, PS_TYPE_F64);
    384     beta->n = beta->nalloc;
    385379    psVector *Params = psVectorAlloc(params->n, PS_TYPE_F32);
    386     Params->n = Params->nalloc;
    387380    psVector *dy     = NULL;
    388381    psF64 Chisq = 0.0;
     
    398391    } else {
    399392        dy = psVectorAlloc(y->n, PS_TYPE_F32);
    400         dy->n = dy->nalloc;
    401393        psVectorInit(dy, 1.0);
    402394    }
Note: See TracChangeset for help on using the changeset viewer.