Beispiel #1
0
omxState::~omxState()
{
	if(OMX_DEBUG) { mxLog("Freeing %d Constraints.", (int) conListX.size());}
	for(int k = 0; k < (int) conListX.size(); k++) {
		delete conListX[k];
	}

	for(size_t ax = 0; ax < algebraList.size(); ax++) {
		// free argument tree
		omxFreeMatrix(algebraList[ax]);
	}

	for(size_t ax = 0; ax < algebraList.size(); ax++) {
		algebraList[ax]->hasMatrixNumber = false;
		omxFreeMatrix(algebraList[ax]);
	}

	if(OMX_DEBUG) { mxLog("Freeing %d Matrices.", (int) matrixList.size());}
	for(size_t mk = 0; mk < matrixList.size(); mk++) {
		matrixList[mk]->hasMatrixNumber = false;
		omxFreeMatrix(matrixList[mk]);
	}
		
	if(OMX_DEBUG) { mxLog("Freeing %d Model Expectations.", (int) expectationList.size());}
	for(size_t ex = 0; ex < expectationList.size(); ex++) {
		omxFreeExpectationArgs(expectationList[ex]);
	}
}
Beispiel #2
0
void omxDestroyRowFitFunction(omxFitFunction *oo) {

	omxRowFitFunction* argStruct = (omxRowFitFunction*)(oo->argStruct);

	omxFreeMatrix(argStruct->dataRow);
	omxFreeMatrix(argStruct->dataColumns);
	delete argStruct;
}
Beispiel #3
0
static void ba81Destroy(omxExpectation *oo) {
	if(OMX_DEBUG) {
		mxLog("Freeing %s function.", oo->name);
	}
	BA81Expect *state = (BA81Expect *) oo->argStruct;
	omxFreeMatrix(state->estLatentMean);
	omxFreeMatrix(state->estLatentCov);
	delete state;
}
Beispiel #4
0
void omxFreeExpectationArgs(omxExpectation *ox) {
	if(ox==NULL) return;
    
	if (ox->destructFun) ox->destructFun(ox);
	omxFreeMatrix(ox->dataColumns);
	Free(ox);
}
Beispiel #5
0
void omxDestroyWLSFitFunction(omxFitFunction *oo) {
	
	if(OMX_DEBUG) {mxLog("Freeing WLS FitFunction.");}
	if(oo->argStruct == NULL) return;
	
	omxWLSFitFunction* owo = ((omxWLSFitFunction*)oo->argStruct);
	omxFreeMatrix(owo->observedFlattened);
	omxFreeMatrix(owo->expectedFlattened);
	omxFreeMatrix(owo->standardExpectedFlattened);
	omxFreeMatrix(owo->B);
	omxFreeMatrix(owo->P);
	omxFreeMatrix(owo->standardExpectedCov);
	omxFreeMatrix(owo->standardExpectedMeans);
	omxFreeMatrix(owo->standardExpectedThresholds);
}
Beispiel #6
0
BA81FitState::~BA81FitState()
{
	omxFreeMatrix(itemParam);
	omxFreeMatrix(latentMean);
	omxFreeMatrix(latentCov);
}
Beispiel #7
0
MarkovExpectation::~MarkovExpectation()
{
	omxFreeMatrix(scaledInitial);
	omxFreeMatrix(scaledTransition);
}
Beispiel #8
0
/* FIML Function body */
void omxDestroyFIMLFitFunction(omxFitFunction *off) {
	if(OMX_DEBUG) { mxLog("Destroying FIML fit function object."); }
	omxFIMLFitFunction *argStruct = (omxFIMLFitFunction*) (off->argStruct);

	omxFreeMatrix(argStruct->smallMeans);
	omxFreeMatrix(argStruct->ordMeans);
	omxFreeMatrix(argStruct->contRow);
	omxFreeMatrix(argStruct->ordRow);
	omxFreeMatrix(argStruct->ordCov);
	omxFreeMatrix(argStruct->ordContCov);
	omxFreeMatrix(argStruct->halfCov);
	omxFreeMatrix(argStruct->reduceCov);

	omxFreeMatrix(argStruct->smallRow);
	omxFreeMatrix(argStruct->smallCov);
	omxFreeMatrix(argStruct->RCX);
	omxFreeMatrix(argStruct->rowLikelihoods);
	omxFreeMatrix(argStruct->rowLogLikelihoods);
	delete argStruct;
}
Beispiel #9
0
void omxDestroyLISRELExpectation(omxExpectation* oo) {

    if(OMX_DEBUG) {
        mxLog("Destroying LISREL Expectation.");
    }

    omxLISRELExpectation* argStruct = (omxLISRELExpectation*)(oo->argStruct);

    omxFreeMatrix(argStruct->cov);
    omxFreeMatrix(argStruct->means);

    omxFreeMatrix(argStruct->A);
    omxFreeMatrix(argStruct->B);
    omxFreeMatrix(argStruct->C);
    omxFreeMatrix(argStruct->D);
    omxFreeMatrix(argStruct->E);
    omxFreeMatrix(argStruct->F);
    omxFreeMatrix(argStruct->G);
    omxFreeMatrix(argStruct->H);
    omxFreeMatrix(argStruct->I);
    omxFreeMatrix(argStruct->J);
    omxFreeMatrix(argStruct->K);
    omxFreeMatrix(argStruct->L);
    omxFreeMatrix(argStruct->TOP);
    omxFreeMatrix(argStruct->BOT);
    omxFreeMatrix(argStruct->MUX);
    omxFreeMatrix(argStruct->MUY);

    if(argStruct->Lnocol) {
        omxFreeMatrix(argStruct->GA);
        omxFreeMatrix(argStruct->TH);
    }

    if(argStruct->noLY) {
        omxFreeMatrix(argStruct->LY);
        omxFreeMatrix(argStruct->PS);
        omxFreeMatrix(argStruct->BE);
        omxFreeMatrix(argStruct->TE);
    }

    if(argStruct->noLX) {
        omxFreeMatrix(argStruct->LX);
        omxFreeMatrix(argStruct->PH);
        omxFreeMatrix(argStruct->TD);
    }
}
Beispiel #10
0
UserConstraint::~UserConstraint()
{
	omxFreeMatrix(pad);
}
Beispiel #11
0
omxLISRELExpectation::~omxLISRELExpectation()
{
	if(OMX_DEBUG) { mxLog("Destroying LISREL Expectation."); }
	
	omxLISRELExpectation* argStruct = this;

	omxFreeMatrix(argStruct->cov);
	omxFreeMatrix(argStruct->means);
	
	omxFreeMatrix(argStruct->A);
	omxFreeMatrix(argStruct->B);
	omxFreeMatrix(argStruct->C);
	omxFreeMatrix(argStruct->D);
	omxFreeMatrix(argStruct->E);
	omxFreeMatrix(argStruct->F);
	omxFreeMatrix(argStruct->G);
	omxFreeMatrix(argStruct->H);
	omxFreeMatrix(argStruct->I);
	omxFreeMatrix(argStruct->J);
	omxFreeMatrix(argStruct->K);
	omxFreeMatrix(argStruct->L);
	omxFreeMatrix(argStruct->TOP);
	omxFreeMatrix(argStruct->BOT);
	omxFreeMatrix(argStruct->MUX);
	omxFreeMatrix(argStruct->MUY);
	
	if(argStruct->Lnocol) {
		omxFreeMatrix(argStruct->GA);
		omxFreeMatrix(argStruct->TH);
	}
	
	if(argStruct->noLY) {
		omxFreeMatrix(argStruct->LY);
		omxFreeMatrix(argStruct->PS);
		omxFreeMatrix(argStruct->BE);
		omxFreeMatrix(argStruct->TE);
	}
	
	if(argStruct->noLX) {
		omxFreeMatrix(argStruct->LX);
		omxFreeMatrix(argStruct->PH);
		omxFreeMatrix(argStruct->TD);
	}
	omxFreeMatrix(slope);
}