?? binaryoutcomecomparator.cpp
字號:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================
#include <stdafx.h> // Precompiled headers.
#include <copyright.h>
#include <kernel/utilities/binaryoutcomecomparator.h>
#include <kernel/utilities/iokit.h>
#include <kernel/utilities/mathkit.h>
#include <kernel/utilities/permuter.h>
#include <kernel/structures/binaryoutcomecurve.h>
#include <kernel/system/fstream.h>
#include <kernel/basic/algorithm.h>
#include <kernel/basic/message.h>
//-------------------------------------------------------------------
// Methods for class BinaryOutcomeComparator.
//===================================================================
//-------------------------------------------------------------------
// Constructors/destructors.
//===================================================================
//-------------------------------------------------------------------
// Method........: Constructors
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
BinaryOutcomeComparator::BinaryOutcomeComparator() {
}
BinaryOutcomeComparator::BinaryOutcomeComparator(const Vector(String) &filenames, const Vector(bool) &swap) {
targets_.erase(targets_.begin(), targets_.end());
outputs_.erase(outputs_.begin(), outputs_.end());
targets_.reserve(filenames.size());
outputs_.reserve(filenames.size());
// Verify dimensions.
if (filenames.size() != swap.size()) {
Message::Error("Dimension mismatch in arguments passed to BinaryOutcomeComparator constructor.");
return;
}
int i, last = -1;
// Load all (target, output) pairs.
for (i = 0; i < filenames.size(); i++) {
targets_.push_back(Vector(int)());
outputs_.push_back(Vector(float)());
last++;
if (!LoadPairs(targets_[last], outputs_[last], filenames[i], swap[i])) {
Message::Error("Failed to load data from " + filenames[i] + ".");
targets_.erase(targets_.begin() + last);
outputs_.erase(outputs_.begin() + last);
last--;
}
}
}
//-------------------------------------------------------------------
// Method........: Destructor
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
BinaryOutcomeComparator::~BinaryOutcomeComparator() {
}
//-------------------------------------------------------------------
// Helper methods.
//===================================================================
//-------------------------------------------------------------------
// Method........: LoadPairs
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....: A
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -