Esempio n. 1
0
double pulse_width(unsigned BaseAddress)
{
  unsigned temp = 0;
  syncronize(BaseAddress);
  temp = pulse_measure(BaseAddress);
  return(temp);
}
void FeatureSetMatcherPresenter::setFeatureSetMatcherParameter(ParameterWidget* featureSetMatcherParameter) {
    disconnect(m_featureSetMatcherParameter, 0, this, 0);
    m_featureSetMatcherParameter = featureSetMatcherParameter;
    m_featureSetMatcherParameter->clearParameterMap();
    m_featureSetMatcherParameter->addDoubleParameter("acceptanceThreshold", "Threshold on the inlier distance", 0.01, 0., 1e17, 3, 0.005);
    syncronize();
    reconnect();
}
FeatureSetMatcherPresenter::FeatureSetMatcherPresenter(AbstractFeatureSetMatcher* featureSetMatcher, ParameterWidget* featureSetMatcherParameter):
    m_featureSetMatcher(featureSetMatcher),
    m_featureSetMatcherParameter(featureSetMatcherParameter)
{
    m_featureSetMatcherParameter->addDoubleParameter("acceptanceThreshold", "Threshold on the inlier distance", 0.01, 0., 1e17, 3, 0.005);
    syncronize();
    reconnect();
}
void DetectorChooserPresenter::setChooser(ParameterWidget* chooser){
    disconnect(m_chooser, 0, this, 0);
    m_chooser = chooser;
    m_chooser->clearParameterMap();
    m_chooser->addEnumParameter("detector", "Type of detector");
    syncronize();
    reconnect();
}
DetectorChooserPresenter::DetectorChooserPresenter(ParameterWidget* chooser):
    m_chooser(chooser),
    m_currentDetectorPresenter(NULL)
{
    m_chooser->addEnumParameter("detector", "Type of detector");
    syncronize();
    reconnect();
}
Esempio n. 6
0
ShapeContextPresenter::ShapeContextPresenter(ShapeContextGenerator* descriptor, ParameterWidget* peakParameter):
    DescriptorPresenter(descriptor, peakParameter)
{
    m_descriptorParameter->addDoubleParameter("minRho", "Minimum radial distance", 0.05, 0.);
    m_descriptorParameter->addDoubleParameter("maxRho", "Maximum radial distance", 0.4, 0.);
    m_descriptorParameter->addIntParameter("binRho", "Number of radial bins", 4, 1);
    m_descriptorParameter->addIntParameter("binPhi", "Number of angular bins", 12, 1);
    m_descriptorParameter->addEnumParameter("distanceFunction", "Histogram distance function");
    syncronize();
    reconnect();
}
Esempio n. 7
0
void ShapeContextPresenter::setDescriptorParameter(ParameterWidget* peakParameter){
    disconnect(m_descriptorParameter, 0, this, 0);
    m_descriptorParameter = peakParameter;
    m_descriptorParameter->clearParameterMap();
    m_descriptorParameter->addDoubleParameter("minRho", "Minimum radial distance", 0.05, 0.);
    m_descriptorParameter->addDoubleParameter("maxRho", "Maximum radial distance", 0.4, 0.);
    m_descriptorParameter->addIntParameter("binRho", "Number of radial bins", 4, 1);
    m_descriptorParameter->addIntParameter("binPhi", "Number of angular bins", 12, 1);
    m_descriptorParameter->addEnumParameter("distanceFunction", "Histogram distance function");
    syncronize();
    reconnect();
}
void FeatureSetMatcherPresenter::setFeatureSetMatcher(AbstractFeatureSetMatcher* featureSetMatcher) {
    m_featureSetMatcher = featureSetMatcher;
    syncronize();
}
Esempio n. 9
0
void ShapeContextPresenter::setDescriptor(DescriptorGenerator* descriptor){
    m_descriptor = descriptor;
    syncronize();
}
Esempio n. 10
0
int main()
{
	FILE* f;
	int j=0;
	int counter = 0;
	int totalbusy = 0;
	initialize();
	char addr[20];
	char jobname[10];
	long randomtime, currenttime;
	char nothing1[40], nothing2[40];
	srand(time(NULL));
	char W[] = "W";
	int wtd;
	//f= fopen("gcc.trc", "r");
	f = fopen("input.txt", "r");
	while(1)
	{
	    counter++;
	    if(counter>750)
        {
            break;
        }
	    /*printf(" 1 To progress 1 work, 0 to terminate :");
	    scanf("%d", &wtd);
	    if(wtd==0)
        {
            break;
        }
        */
		if(fscanf(f, "%s", nothing1)==EOF)
		{
			break;
		}
		fscanf(f, "%s", currenttime);
		fscanf(f, "%s", jobname);
		fscanf(f, "%s", addr);
		//fscanf(f, "%s", jobname);
		/*if(!strncmp(jobname,W,1))
        {
            fscanf(f, "%s", nothing2);
            strncpy(addr, nothing2, 20);
        }
        else
        {
            fscanf(f, "%s", addr);
            strcat(addr, "0");
            fscanf(f, "%s", nothing2);
        }
        */
        addr[10] = '\0';
		//printf("%s", row[2].rowbuffer);
		jobqueue *jq = (jobqueue *)malloc(sizeof(jobqueue));
		strncpy(jq->addr, addr,20);
		//randomtime = rand()%200; // 0 to 499, random number
		randomtime=135;
		printf("--------------------------------------------------\n");
		printf("Address : %s , Job : %s , Random time : %d , Bank : %d \n Total time :%d\n", addr, jobname, randomtime, getbank(addr), currenttime);
		printf("--------------------------------------------------\n\n\n");
		//strncpy(jq->job, jobname, 10);
		strncpy(jq->job, jobname, 1);

		syncronize(currenttime);
		currenttime += randomtime;
		jq->initialtime = currenttime;
		jq->time = currenttime;
		totalbusy += access(jq, getbank(addr));
        printallbanks();

	}
	//printf("%s\n", getrow(addr));
	//printf("%d\n", getbank(addr));
	fclose(f);
	//printf("totalbusy : %li", row[4].totalbusy);
}