Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Training::Fisher::SaveModel ( const std::string &  name,
Util::Database db 
) [inline, virtual]

Implements Impala::Core::Training::Classifier.

Definition at line 516 of file Fisher.h.

References Impala::Util::FileCopyLocalToRemote(), Impala::FileNameTmp(), Impala::Util::Database::GetInstance(), Impala::Util::Database::GetIOBuffer(), mOffset, mRotation, and Impala::Core::Array::WriteRaw().

00517     {
00518         if (Util::Database::GetInstance().GetDataChannel())
00519         {
00520             std::string tmpName = FileNameTmp();
00521             //if(svm_save_model(name.c_str(), mModel) == -1)
00522             Util::Database& db = Util::Database::GetInstance();
00523             Util::IOBuffer* buf = db.GetIOBuffer(tmpName, true, false, "");
00524 
00525             WriteRaw(mRotation,buf,true);
00526             WriteRaw(mOffset,buf,true);
00527             delete buf;
00528 
00529             Util::FileCopyLocalToRemote(tmpName, name);
00530             unlink(tmpName.c_str());
00531         }
00532         else
00533         {
00534             Util::Database& db = Util::Database::GetInstance();
00535             Util::IOBuffer* buf = db.GetIOBuffer(name, true, false, "");
00536 
00537             WriteRaw(mRotation,buf,true);
00538             WriteRaw(mOffset,buf,true);
00539             delete buf;
00540         }
00541     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:23:41 2010 for ImpalaSrc by  doxygen 1.5.1