FEMPair::FEMPair(const FEM *b, const FEM *a, bool align, bool scale) : first(new FEM(*b)) , second(new FEM(*a)) , trunc(nullptr) { #ifndef QT_NO_DEBUG qDebug() << "construct pair" << a << b; QTime begin(QTime::currentTime()); #endif if (align) { first->alignZero(); second->alignZero(); } if (scale) { second->scaleTo(first->box().size()); } trunc = FEM::truncation(*theory(), *practic()); //estimate macMatrix makeMac(practic()->getModes(), trunc->getModes()); calculateRelations(); #ifndef QT_NO_DEBUG qDebug() << "construct pair delay" << begin.msecsTo(QTime::currentTime()) << "ms"; #endif }
void SplitDefinitions::prepare() { savedOptions = BootstrappingUtils::setBootstrappingOptions(); if (not getGlobal()->instance()->alreadyParsed("definitions")) { parsefile("definitions"); } auto defnamespace = getGlobal()->getGlobalNamespace()->subspace("stdspace")->subspace("definitionbootstrapping"); Assert(defnamespace != NULL); auto splitVoc = defnamespace->vocabulary("def_split_voc"); Assert(splitVoc != NULL); sameDef = splitVoc->pred("samedef/2"); Assert(sameDef != NULL); auto deptheo = defnamespace->theory("dependency"); Assert(deptheo != NULL); splittheo = defnamespace->theory("def_split_theory"); Assert(splittheo != NULL); splittheo = FormulaUtils::merge(splittheo, deptheo); Assert(splittheo != NULL); }
void sim(int argc, char *argv[]) { set_model_name("M/M/1 Queue"); create("sim"); cnt = NARS; for(int i = 1; i <= NARS; i++) { hold(expntl(IAR_TM)); // interarrival interval customer(); // generate next customer } done.wait(); // wait for last customer to depart report(); // model report theory(); mdlstat(); // model statistics }
AbstractTheory* InternalArgument::get<AbstractTheory*>() { return theory(); }
int main(){ context ctx; theory temp = theory(ctx); return 0; }