18 #include <utility/tag/Tag.hh>
20 #include <basic/Tracer.hh>
24 #include <utility/io/izstream.hh>
28 namespace simple_filters {
30 static basic::Tracer
TR(
"protocols.simple_filters.Sigmoid" );
40 protocols::filters::
Filter(
"Sigmoid" ),
47 baseline_checkpointing_filename_(
"" )
59 bool compute_new_baseline(
false );
60 if( attempt_read_from_checkpoint )
61 TR<<
"Reading baseline from checkpoint file, if one exists"<<std::endl;
63 TR<<
"Not reading from checkpoint file"<<std::endl;
67 compute_new_baseline =
true;
72 f.seekg( 0, ios::beg );
73 if( end - begin == 0 )
74 compute_new_baseline =
true;
76 if( !compute_new_baseline ){
79 std::istringstream line_stream( line );
81 TR<<
"Loading Sigmoid baseline from checkpoint. Loaded baseline: "<<baseline_<<std::endl;
89 TR<<
"Computed new baseline and set to: "<<
baseline_<<std::endl;
106 negate( tag->getOption<
bool >(
"negate",
false ) );
122 o <<
"Sigmoid returns "<<val<<std::endl;
137 TR<<
"filter val/transform: "<<val<<
" "<<complement<<std::endl;
138 TR<<
"returning: "<<complement<<std::endl;
139 return( complement );