• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ calculate_output函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中calculate_output函数的典型用法代码示例。如果您正苦于以下问题:C++ calculate_output函数的具体用法?C++ calculate_output怎么用?C++ calculate_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了calculate_output函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main()
{
	// default output
	int output = -1;

	// main i/o-loop
        for(int i=1; i < 6; ++i)
	{
		// read input
		int input = nse_symbolic_int();
		if(input == 1) {
		} else if(input == 2) {
		} else if(input == 3) {
		} else if(input == 4) {
		} else if(input == 5) {
		} else {
			input = 6;
		}

		// operate eca engine
		output = calculate_output(input);
	}

    return 0;
}
开发者ID:ahorn,项目名称:benchmarks,代码行数:25,代码来源:Problem01_20_false.cpp


示例2: main

int main() {

    struct timeval t0, t1;
    int temp, g, i;
    double* y = (double*) malloc(sizeof (double)*nb_snapshot);
    //double mod1, mod2;
    int elapsed;

    //preparation du radar 
    double *matrice_real = (double*) malloc(sizeof (double) * nb_sensor * nb_theta);
    double *matrice_img = (double*) malloc(sizeof (double) * nb_sensor * nb_theta);
    double *theta_radar = (double*) malloc(sizeof (double) * nb_theta);
    double *aux_real = (double*) malloc(sizeof (double)*nb_theta);
    double *aux_img = (double*) malloc(sizeof (double)*nb_theta);
    double *snapshot_real = (double*) malloc(sizeof (double)*nb_sensor * nb_snapshot);
    double *snapshot_img = (double*) malloc(sizeof (double)*nb_sensor * nb_snapshot);

    initialize_radar(theta_radar, (double(*)[nb_sensor])matrice_real, (double(*)[nb_sensor]) matrice_img);
    calculate_snapshot((double(*)[nb_sensor])snapshot_real, (double(*)[nb_sensor])snapshot_img);

    gettimeofday(&t0, 0);
    
    for (g = 0; g < nb_snapshot; g++) {



        /*        double* t=(double(*))snapshot_real + nb_sensor*g;
                for(i=0;i<nb_sensor;i++)
                printf("%d *** %lf\n",g,t[i]);*/

        temp = calculate_output(aux_real, aux_img, (double(*)[nb_sensor])matrice_real, (double(*)[nb_sensor])matrice_img, (double(*))snapshot_real + nb_sensor*g, (double(*))snapshot_img + nb_sensor * g);

        /*        temp = 0;
                for (i = 1; i < nb_theta; i++) {
                    mod1 = pow(aux_real[i], 2) + pow(aux_img[i], 2);
                    mod2 = pow(aux_real[temp], 2) + pow(aux_img[temp], 2);
                    temp = (mod1 >= mod2) ? i : temp;
                    //       mod2 = (mod1 >= mod2) ? mod2 = pow(aux_real[temp], 2) + pow(aux_img[temp], 2) : mod2;
                    if (mod1 >= mod2) {
                        temp = i;
                        mod2 = pow(aux_real[temp], 2) + pow(aux_img[temp], 2);
                    }
                }*/

        y[g] = (-90. + temp * 180. / nb_theta);
    }

    gettimeofday(&t1, 0);

//     for (i = 0; i < nb_snapshot; i++) {
//         printf("%lf\n", y[i]);
//     }
    elapsed = (t1.tv_sec - t0.tv_sec) * 1000000 + t1.tv_usec - t0.tv_usec;
    printf("Elapsed time: %.3f ms\n", ((float) elapsed) / (1000.));

    return (EXIT_SUCCESS);
}
开发者ID:Ced,项目名称:substrate,代码行数:57,代码来源:conventional_beamforming.c


示例3: main

int main()
{
  int input;
  scanf("%d",&input);
  int output;
  output = calculate_output(input);
  printf("%d",output);
  return 0;
}
开发者ID:adrian-prantl,项目名称:edg4x-rose,代码行数:9,代码来源:rers_mini2.c


示例4: main

int main()
{
    int output = -1;
    while(1)
    {
        int input;
        scanf("%d", &input);        
        output = calculate_output(input);
			printf("%d\n", output);
    }
}
开发者ID:adrian-prantl,项目名称:edg4x-rose,代码行数:11,代码来源:rers_mini10.c


示例5: main

int main()
{
    int output = -1;
    {
        int input;
        scanf("%d", &input);        
        output = calculate_output(input);
        if(output == -2)            fprintf(stderr, "Invalid input: %d\n", input);
            printf("%d\n", output);
    }
}
开发者ID:8l,项目名称:rose,代码行数:11,代码来源:rers_mini13.c


示例6: calculate_output

double CompressorEffect::calculate_gain(double input)
{
//  	double x_db = DB::todb(input);
//  	double y_db = config.calculate_db(x_db);
//  	double y_linear = DB::fromdb(y_db);
	double y_linear = calculate_output(input);
	double gain;
	if(input != 0)
		gain = y_linear / input;
	else
		gain = 100000;
	return gain;
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:13,代码来源:compressor.C


示例7: main

int main() {
    int output = -1;
    while(1) {
        int input;
        scanf("%d", &input);        
        output = calculate_output(input);
        printf("%d\n", output);
        // State={(a1,1), (output,22), (input,top)}, constraints={input==3}
        // State={(a1,1), (output,23), (input,top)}, constraints={input==2}
        // State={(a1,1), (output,23), (input,top)}, constraints={input!=2,input!=3,input!=4}
    }
    return 0;
}
开发者ID:8l,项目名称:rose,代码行数:13,代码来源:rers_mini8.c


示例8: main

int main()
{
    //srand((unsigned)time(NULL));
    // main i/o-loop
    while(1)
    {
        // read input
        int input;
        scanf("%d", &input);        
        // operate eca engine
        calculate_output(input);
    }
}
开发者ID:8l,项目名称:rose,代码行数:13,代码来源:Problem1T_size5_14.c


示例9: main

int main()
{
    // default output
    int output = -1;

    // main i/o-loop
	//   while(1)
    {
        // read input
        int input;
        // operate eca engine
		output = calculate_output(input);
    }
}
开发者ID:adrian-prantl,项目名称:edg4x-rose,代码行数:14,代码来源:rers_mini3.c


示例10: main

int main()
{
    // default output
    int output = -1;

    // main i/o-loop
    while(1)
    {
        // read input
        int input;
        input = __VERIFIER_nondet_int();
        if ((input != 2) && (input != 3) && (input != 4) && (input != 5) && (input != 6)) return -2;

        // operate eca engine
        output = calculate_output(input);
    }
}
开发者ID:lgpbentes,项目名称:sv-benchmarks,代码行数:17,代码来源:Problem10_label33_true-unreach-call.c


示例11: main

int main()
{
    // default output
    output = -1;

    // main i/o-loop
    while(1)
    {
      // read input
        input = __VERIFIER_nondet_int();
		__VERIFIER_assume(input >= 1 && input <= 6);


        // operate eca engine
        output = calculate_output(input);
		
    }
}
开发者ID:ultimate-pa,项目名称:ultimate,代码行数:18,代码来源:Problem14_prop_034.c


示例12: main

int main()
{
    // default output
    int output = -1;

    // main i/o-loop
    while(1)
    {
        // read input
        int input;
        scanf("%d", &input);        

        // operate eca engine
        output = calculate_output(input);
		if(output == -2)
        	fprintf(stderr, "Invalid input: %d\n", input);
        else if(output != -1)
			printf("%d\n", output);
    }
}
开发者ID:SunshineAllWay,项目名称:CPAchecker,代码行数:20,代码来源:Problem11.c


示例13: main

int main()
{
	// default output
	int output = -1;

	// main i/o-loop
	while(1)
	{
		// read input
		int input = __VERIFIER_nondet_int();
		if(input == 1) {
		} else if(input == 2) {
		} else if(input == 3) {
		} else if(input == 4) {
		} else if(input == 5) {
		} else {
			input = 6;
		}

		// operate eca engine
		output = calculate_output(input);
	}
}
开发者ID:mchalupa,项目名称:SymDIVINE,代码行数:23,代码来源:Problem14_50_true.c


示例14: main


//.........这里部分代码省略.........
	chkvariance = chkvariance + temp;
	}
	}
	chkvariance = chkvariance /((Out_n * checking_data_n)-1);
	printf("epochs \t trn error \t tst error\n");
	printf("------ \t --------- \t ---------\n");
	//printf("not entering the epoch loop and the i loop yoyoyo\n");
/**************
	for(ep_n = 0; ep_n < epoch_n; ep_n++)
	{ 
		//step_size_pointer= &step_size;		
		//printf("epoch numbernumber %d \n", ep_n);	
		//step_size_array[ep_n] = step_size_pointer;
		step_size_array[ep_n] = step_size;
	// after the above step, the updated stepsize at the end of the last loop is stored in the step_size_array.
	// this will keep happening every time we start en epoch and hence at the end of the loop, step_size_array will 
	// have a list of all the updated step sizes. Since this is a offline version, step sizes are updated only
	// at the end of an epoch. 
		for(m = 0; m < Out_n; m++)
		{ 	
			//printf("m loop number %d \n", m);	
			for(j = 0; j < training_data_n; j++)
			{ 
				//printf("j loop number %d \n", j);				
				//copy the input vector(s) to input node(s)
				put_input_data(node_p,j, training_data_matrix); //input.c
	// after this(above) step, the input data is transferred frm the training data matrix to the "node" structure.
				//printf("testing \n");	
				//printf("reeeetesting \n");	
				target[m] = training_data_matrix[j][(m+1)*In_vect_n+m]; // *** 
	// this step assigns the value of the "m"th output of "j" th trainig data pair to target.
				//printf("testing \n");	
				//forward pass, get node outputs from layer 1 to layer 4
				calculate_output(In_n, In_n + In_n*Mf_n + 3*Rule_n - 1, j); //forward.c
	// after this step, output of nodes in layer 1 to 4 is calculated. Please note that when this happens for the first
	// time, i.e. when ep_n=0, our network parametrs are already initialized. thus, it is possible to get the
	// output of each node using the function definitios proposed in forward.c. After first epoch, our parametrs get 
	// updated and this output is then calculated using teh new parameters. The essential point to note here is that
	// we can always calculate the output of each node since we have already initialized our parameters.
				//printf("testing \n");	
				//put outputs of layer 1 to 4 into layer_1_to_4_output
		
				for(k = 0; k < Mf_n*In_n + 3*Rule_n; k++)
				{
				//printf("testing \n");	
				layer_1_to_4_output[j][k] = *node_p[k + In_n]->value;
				}
	// the above loop simply puts the values of nodes from layer 1 to layer 4 in the layer_1_to_4_output matrix.

				//identify layer 5 params using LSE (Kalman filter)
				//printf("testing \n");	
				get_kalman_data(kalman_data, target); //kalman.c
	// this function call finds out the values of O4iXnl .. these are basically the coefficients
	// of the kalman parametrs for a given training data pair
	//puts them in kalman_data matrix.
	// this kalman_data matrix has In_n number of rows and number of columns equal to number of parametrs that are
	// responsible for determining each output... as stated above, the outputs are actually the coefficients of the
	// parameters.

				//printf("testing \n");	
				//calculate Kalman parameters
				
				kalman(ep_n, j+(m*training_data_n), m, kalman_data, kalman_parameter,target); //kalman.c
	// this function call evaluates kalman parametrs for a given output, for a given epoch.. that is it takes the epoch 
	// number from us, takes the info about how many times has kalman been invoked before, also takes in the
	// output number(row number) for whihc the parametrs are to be found out... it also takes kalman_data and reads 
开发者ID:crossvalidator,项目名称:neural_net_time_series,代码行数:67,代码来源:ANCFIS.c


示例15: set_input_vector

void Comrade::Osiris::FastSOM_Neuron::calculate_output
(const std::vector<double>& ip_vector)
{
	set_input_vector(ip_vector);
	calculate_output();
}
开发者ID:SiChiTong,项目名称:COMRADE,代码行数:6,代码来源:GenericSOM_Neuron.cpp



注:本文中的calculate_output函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ calculate_path函数代码示例发布时间:2022-05-30
下一篇:
C++ calculate_delta函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap