<commit_before>/*
 * ArborTestProbe.cpp
 *
 *  Created on: Sep 6, 2011
 *      Author: kpeterson
 */

#include "ArborTestProbe.hpp"
#include "../PetaVision/src/include/pv_arch.h"
#include "../PetaVision/src/layers/HyPerLayer.hpp"
#include <string.h>
#include <assert.h>

namespace PV {

ArborTestProbe::ArborTestProbe(const char * filename, HyPerLayer * layer, const char * msg)
: StatsProbe(filename, layer, msg)
{
}

ArborTestProbe::ArborTestProbe(HyPerLayer * layer, const char * msg)
: StatsProbe(layer, msg)
{
}

ArborTestProbe::~ArborTestProbe() {}


int ArborTestProbe::outputState(float timef)
{
	int status = StatsProbe::outputState(timef);
#ifdef PV_USE_MPI
   InterColComm * icComm = getTargetLayer()->getParent()->icCommunicator();
   const int rcvProc = 0;
   if( icComm->commRank() != rcvProc ) {
      return 0;
   }
#endif // PV_USE_MPI
	if(timef==3.0f){
		assert((avg>0.24)&&(avg<0.29));
	}
	else if(timef==4.0f){
		assert((avg>0.4)&&(avg<0.61));
	}
	else if(timef==5.0f){
		assert((avg>0.74)&&(avg<0.761));
	}
	else if(timef>5.0f){
		assert((fMin>0.97)&&(fMin<1.070));
		assert((fMax>0.97)&&(fMax<1.070));
		assert((avg>0.97)&&(avg<1.070));
	}

	return status;
}


} /* namespace PV */
<commit_msg>Change tolerances in ArborTestProbe.  With the change in InitSpreadOverArborsWeights, much smaller tolerances are sufficient to pass the test<commit_after>/*
 * ArborTestProbe.cpp
 *
 *  Created on: Sep 6, 2011
 *      Author: kpeterson
 */

#include "ArborTestProbe.hpp"
#include "../PetaVision/src/include/pv_arch.h"
#include "../PetaVision/src/layers/HyPerLayer.hpp"
#include <string.h>
#include <assert.h>

namespace PV {

ArborTestProbe::ArborTestProbe(const char * filename, HyPerLayer * layer, const char * msg)
: StatsProbe(filename, layer, msg)
{
}

ArborTestProbe::ArborTestProbe(HyPerLayer * layer, const char * msg)
: StatsProbe(layer, msg)
{
}

ArborTestProbe::~ArborTestProbe() {}


int ArborTestProbe::outputState(float timef)
{
	int status = StatsProbe::outputState(timef);
#ifdef PV_USE_MPI
   InterColComm * icComm = getTargetLayer()->getParent()->icCommunicator();
   const int rcvProc = 0;
   if( icComm->commRank() != rcvProc ) {
      return 0;
   }
#endif // PV_USE_MPI
	if(timef==3.0f){
		assert((avg>0.2499)&&(avg<0.2501));
	}
	else if(timef==4.0f){
		assert((avg>0.4999)&&(avg<0.5001));
	}
	else if(timef==5.0f){
		assert((avg>0.7499)&&(avg<0.7501));
	}
	else if(timef>5.0f){
		assert((fMin>0.9999)&&(fMin<1.001));
		assert((fMax>0.9999)&&(fMax<1.001));
		assert((avg>0.9999)&&(avg<1.001));
	}

	return status;
}


} /* namespace PV */

{'fraction_non_alphanumeric': 0.18463925523661753, 'fraction_numerical': 0.048875096974398756, 'mean_word_length': 4.631004366812227, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4918560', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1060, 'n_words': 175}