コード例 #1
0
ファイル: models.cpp プロジェクト: idaohang/mole
void UpdatingFileModel::finishRefill()
{
  UpdatingModel::finishRefill();
  if (dirty) {
    // note: I/O access
    saveModelToFile();
    dirty = false;
  }
}
コード例 #2
0
ファイル: ThresholdDetection.cpp プロジェクト: damellis/ESP
bool ThresholdDetection::saveModelToFile(string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #3
0
ファイル: TimeDomainFeatures.cpp プロジェクト: Amos-zq/grt
bool TimeDomainFeatures::saveModelToFile(const string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #4
0
ファイル: PostProcessing.cpp プロジェクト: BryanBo-Cao/grt
bool PostProcessing::saveModelToFile(std::string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #5
0
ファイル: MovementIndex.cpp プロジェクト: eboix/Myo-Gesture
bool MovementIndex::saveModelToFile(string filename) const {

    std::fstream file;
    file.open(filename.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ) {
        return false;
    }

    file.close();

    return true;
}
コード例 #6
0
ファイル: RBMQuantizer.cpp プロジェクト: GaoXiaojian/grt
bool RBMQuantizer::saveModelToFile(const string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #7
0
bool TimeseriesBuffer::saveModelToFile(string filename) const {

    std::fstream file;
    file.open(filename.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ) {
        return false;
    }

    file.close();

    return true;
}
コード例 #8
0
ファイル: GMM.cpp プロジェクト: gaurav38/HackDuke13
bool GMM::saveModelToFile(string filename){
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
	file.close();
    
	return true;
}
コード例 #9
0
ファイル: MinDist.cpp プロジェクト: ios4u/grt
bool MinDist::saveModelToFile(string filename) const{

    if( !trained ) return false;
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }

	file.close();

	return true;
}
コード例 #10
0
bool LinearRegression::saveModelToFile(string filename){

    if( !trained ) return false;
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }

	file.close();

	return true;
}
コード例 #11
0
ファイル: DTW.cpp プロジェクト: gaurav38/HackDuke13
bool DTW::saveModelToFile( string fileName ){

    std::fstream file;

    if(!trained){
       errorLog << "saveDTWModelToFile( string fileName ) - Model not trained yet, can not save to file" << endl;
     return false;
    }

    file.open(fileName.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ){
        return false;
    }

    file.close();
    return true;
}
コード例 #12
0
bool DoubleMovingAverageFilter::saveModelToFile( std::string filename ) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The DoubleMovingAverageFilter has not been initialized" << std::endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #13
0
bool SavitzkyGolayFilter::saveModelToFile( std::string filename ) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The HighPassFilter has not been initialized" << std::endl;
        return false;
    }
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #14
0
ファイル: Derivative.cpp プロジェクト: eboix/Myo-Gesture
bool Derivative::saveModelToFile(string filename) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The DeadZone has not been initialized" << endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #15
0
bool ClassLabelTimeoutFilter::saveModelToFile(string filename) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The ClassLabelTimeoutFilter has not been initialized" << endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
コード例 #16
0
ファイル: MLBase.cpp プロジェクト: BryanBo-Cao/grt
bool MLBase::save(const std::string filename) const {
    return saveModelToFile( filename );
}