コード例 #1
0
AssetTemplateModel::AssetTemplateModel( QObject * parent )
: RecordSuperModel( parent )
{
	new AssetTemplateTranslator(treeBuilder());
	setHeaderLabels( QStringList() << "Name" );
	Table * et = Element::table();
	connect( et, SIGNAL( added( RecordList ) ), SLOT( added( RecordList ) ) );
	connect( et, SIGNAL( removed( RecordList ) ), SLOT( removed( RecordList ) ) );
	connect( et, SIGNAL( updated(  Record , Record ) ), SLOT( updated( Record , Record  ) ) );
	et = FileTracker::table();
	connect( et, SIGNAL( added( RecordList ) ), SLOT( added( RecordList ) ) );
	connect( et, SIGNAL( removed( RecordList ) ), SLOT( removed( RecordList ) ) );
	connect( et, SIGNAL( updated(  Record , Record ) ), SLOT( updated( Record , Record  ) ) );
}
コード例 #2
0
// Public methods.
void RandomForestBuilder::build() {
  common::debug::print("Creating %d random tree(s)\n", classificatorParameters.RandomTreesCount);

  Trees trainedRandomTrees;
  trainedRandomTrees.reserve(classificatorParameters.RandomTreesCount);

  for (int i = 0; i < classificatorParameters.RandomTreesCount; ++i) {
    std::vector<int> trainingSet;
    std::vector<int> outOfBagSet;

    generateBootStrap(trainingSet, outOfBagSet);

    RandomTreeBuilder treeBuilder(featuresCollection, trainingSet, classificatorParameters);
    treeBuilder.build();

    trainedRandomTrees.push_back(treeBuilder.getTreeStructure());
    common::debug::print("[%d] Trained Random Tree...\n", i + 1);
  }

  cleanUp();
  forest = new RandomForest(trainedRandomTrees, featuresCollection.size());
}
コード例 #3
0
, mRefreshScheduled( false )
, mLimit( 600 )
{
	QStringList cols, col_names;
	foreach( Field * field, JobAssignment::table()->schema()->fields() ) {
		QString fnl = field->name().toLower();
		if( fnl == "command" || fnl == "stdout" || fnl == "stderr" ) continue;
		if( fnl == "fkeyjobassignmentstatus" ) statusColumn = field->pos();
		cols << field->name();
		col_names << field->displayName();
	}
	jobServicesColumn = col_names.size();
	col_names << "Job Services";
	mModel = new RecordSuperModel(this);
	mModel->setHeaderLabels( col_names );
	mTrans = new JobAssignmentTranslator(mModel->treeBuilder());
	mTrans->setRecordColumnList( cols );
	setModel( mModel );
	setRootIsDecorated( true );
	connect( this, SIGNAL( doubleClicked( const QModelIndex & ) ), SLOT( slotDoubleClicked( const QModelIndex & ) ) );
}

void HostHistoryView::slotDoubleClicked( const QModelIndex & idx )
{
	JobAssignment ja( mModel->getRecord(idx) );
	JobTaskAssignment jta( mModel->getRecord(idx) );
	if( !ja.isRecord() && !jta.isRecord() ) return;

	QString col = mTrans->recordColumnName( idx.column() ).toLower();
	if( col == "fkeyjoberror" ) {
		RecordPropValTree * tree = new RecordPropValTree(0);
コード例 #4
0
ファイル: intersection.cpp プロジェクト: codemodo/renderer
void IntersectionEngine::BuildBvhTree()
{
    BvhTree treeBuilder(scene->objects);
}
コード例 #5
0
PassRefPtrWillBeRawPtr<DocumentFragment> VTTParser::createDocumentFragmentFromCueText(Document& document, const String& cueText)
{
    VTTTreeBuilder treeBuilder(document);
    return treeBuilder.buildFromString(cueText);
}