当前位置: 首页>>代码示例>>C++>>正文


C++ set_params函数代码示例

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


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

示例1: rb_ool_conmin_function_set

static VALUE rb_ool_conmin_function_set(int argc, VALUE *argv, VALUE obj)
{
	ool_conmin_function *F;
	Data_Get_Struct(obj, ool_conmin_function, F);
	switch (argc) {
	case 0:
			break;
	case 1:
		rb_ool_conmin_function_set_n(obj, argv[0]);
		break;
	case 4:
		set_functions(argc, argv, F);
		break;
	case 5:
		if (FIXNUM_P(argv[0])) {
			rb_ool_conmin_function_set_n(obj, argv[0]);			
			set_functions(argc-1, argv+1, F);			
		} else {
			set_functions(argc-1, argv, F);
			set_params(F, argv[argc-1]);
		}
		break;
	case 6:
		rb_ool_conmin_function_set_n(obj, argv[0]);	
		set_functions(argc-2, argv+1, F);			
		set_params(F, argv[argc-1]);		
		break;
	default:
		rb_raise(rb_eArgError, "Wrong number of arguments.");
	}	
	return obj;
}
开发者ID:vesselinv,项目名称:rb-gsl,代码行数:32,代码来源:ool.c

示例2: cb_dialog_so_size_apply_clicked

static void
cb_dialog_so_size_apply_clicked (G_GNUC_UNUSED GtkWidget *button,
				   SOSizeState *state)
{
	char const *name;
	GOUndo *undo = NULL, *redo = NULL;
	char const *undo_name = NULL;
	int cnt = 0;

	if (state->so_size_needs_restore || state->so_pos_needs_restore) {
		char const *label = state->so_pos_needs_restore ?
			_("Move Object") : _("Resize Object");
		sheet_object_set_anchor	(state->so, state->old_anchor);
		if (!cmd_objects_move (WORKBOOK_CONTROL (state->wbcg),
				       g_slist_prepend (NULL, state->so),
				       g_slist_prepend
				       (NULL, sheet_object_anchor_dup
					(state->active_anchor)),
				       FALSE, label))
			dialog_so_size_load (state);
	}

	name = gtk_entry_get_text (state->nameentry);
	if (name == NULL)
		name = "";
	if (strcmp (name, state->old_name) != 0) {
		char *old_name, *new_name;

		g_object_get (G_OBJECT (state->so), "name", &old_name, NULL);
		undo = go_undo_combine (undo, set_params (state->so, old_name));

		new_name = (*name == '\0') ? NULL : g_strdup (name);
		redo = go_undo_combine (redo, set_params (state->so, new_name));

		undo_name = _("Set Object Name");
		cnt++;
	}
	if (state->so_print_check_changed) {
		gboolean val = ((state->so->flags & SHEET_OBJECT_PRINT) != 0);
		undo = go_undo_combine (undo, set_print_flag
					(state->so,  val));
		redo = go_undo_combine (redo, set_print_flag
					(state->so, !val));
		undo_name =  _("Set Object Print Property");
		cnt++;
	}

	if (cnt > 0) {
		if (cnt > 1)
			undo_name =  _("Set Object Properties");
		state->so_name_changed = state->so_print_check_changed =
			cmd_generic (WORKBOOK_CONTROL (state->wbcg),
				     undo_name, undo, redo);
	}
	dialog_so_size_button_sensitivity (state);

	return;
}
开发者ID:UIKit0,项目名称:gnumeric,代码行数:58,代码来源:dialog-sheetobject-size.c

示例3: ParamPolicy

 BM::BetaModel(double a, double b)
   : ParamPolicy(new UnivParams(a), new UnivParams(b)),
     DataPolicy(new BS),
     PriorPolicy()
 {
   set_params(a, b);
 }
开发者ID:comenerv,项目名称:Boom,代码行数:7,代码来源:BetaModel.cpp

示例4: rb_ool_conmin_function_set_params

static VALUE rb_ool_conmin_function_set_params(VALUE obj, VALUE p)
{
	ool_conmin_function *F;
	Data_Get_Struct(obj, ool_conmin_function, F);
	set_params(F, p);
	return p;
}
开发者ID:vesselinv,项目名称:rb-gsl,代码行数:7,代码来源:ool.c

示例5: compute_light

t_color		compute_light(t_scene *scene, t_ray *ray)
{
	t_list	*current;
	t_ray	lray;
	t_color	color[3];
	t_phpa	ph;

	current = scene->lights;
	ph.normal = get_normal(*ray);
	set_ambiant_light(&ph, scene, ray, color);
	while (current)
	{
		lray.pos = ((t_light *)current->content)->pos;
		lray.dir = norm_vect(mtx_add(mtx_sub(mtx_mult(ray->dir, ray->t),
			lray.pos), ray->pos));
		lray.invdir = get_inv_vect(&lray.dir);
		if (find_closest(scene, &lray) && ray->closest == lray.closest
			&& near_enough(ray, &lray))
		{
			set_params(&ph, &lray, ray);
			ph.camera = scene->camera;
			ph.light = (t_light *)current->content;
			phong(&ph);
		}
		current = current->next;
	}
	set_color_max(&ph);
	return (*color);
}
开发者ID:Entrivax,项目名称:RT,代码行数:29,代码来源:compute_light.c

示例6: source_config_props

static int source_config_props(AVFilterLink *outlink)
{
    AVFilterContext *ctx = outlink->src;
    Frei0rContext *s = ctx->priv;

    if (av_image_check_size(s->w, s->h, 0, ctx) < 0)
        return AVERROR(EINVAL);
    outlink->w = s->w;
    outlink->h = s->h;
    outlink->time_base = s->time_base;
    outlink->frame_rate = av_inv_q(s->time_base);

    if (s->destruct && s->instance)
        s->destruct(s->instance);
    if (!(s->instance = s->construct(outlink->w, outlink->h))) {
        av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance.\n");
        return AVERROR(EINVAL);
    }
    if (!s->params) {
        av_log(ctx, AV_LOG_ERROR, "frei0r filter parameters not set.\n");
        return AVERROR(EINVAL);
    }

    return set_params(ctx, s->params);
}
开发者ID:AVLeo,项目名称:libav,代码行数:25,代码来源:vf_frei0r.c

示例7: initialized_

  //---------------------------------------------------------------------------
  ObjectTracker::ObjectTracker(const ObjectTrackerParams& params)
      :
        initialized_(false),
        tracker_(NULL)
  {
    // Store configurable parameters internally
    set_params(params);

    // Allocate the proper tracking algorithm (note: error-checking that a valid
    // tracking algorithm parameter is used is done in the ObjectTrackerParams
    // constructor, so at this point we are confident it's valid).
    switch (params.algorithm_)
    {
      case ObjectTrackerParams::CV_ONLINEBOOSTING:
        tracker_ = new OnlineBoostingAlgorithm();
        break;
      case ObjectTrackerParams::CV_SEMIONLINEBOOSTING:
        tracker_ = new SemiOnlineBoostingAlgorithm();
        break;
      case ObjectTrackerParams::CV_ONLINEMIL:
        tracker_ = new OnlineMILAlgorithm();
        break;
      case ObjectTrackerParams::CV_LINEMOD:
        tracker_ = new LINEMODAlgorithm();
        break;
      default:
        // By default, if an invalid choice somehow gets through lets use online boosting?
        // Or throw an error and don't continue?
        tracker_ = new OnlineBoostingAlgorithm();
        break;
    }
  }
开发者ID:Chickyky,项目名称:gsoc11_tracking,代码行数:33,代码来源:object_tracker.cpp

示例8: tee_msgm_set_params

/* *********************
 * set params in ntw
 * *********************/
tee_stat_t tee_msgm_set_params(tee_msgm_t msgm, tee_msg_op_info_t *params)
{
	tee_msgm_ntw_struct *ntw_handle = NULL;
	tee_stat_t set_params_stat = TEEC_SUCCESS;
	uint32_t times = PARAM_NUMBERS, idx = 0, type = TEEC_NONE;

	OSA_ASSERT((msgm && params));
	ntw_handle = (tee_msgm_ntw_struct *) msgm;
	OSA_ASSERT(IS_MAGIC_VALID(ntw_handle->magic));
	while (times--) {
		type = TEEC_PARAM_TYPE_GET(params->paramTypes, idx);
		if (!IS_PARAMTYPES_TYPE_VALID(type)) {
			TZDD_DBG("tee_msgm_set_params: bad paramsTypes\n");
			return TEEC_ERROR_BAD_PARAMETERS;
		}
		if (IS_TYPE_MEMREF(type)) {
			if (!IS_NTW_MEM_FLAG_VALID(params->params[idx].memref.parent->flags)) {
				TZDD_DBG("tee_msgm_set_params: un-compatible arg\n");
				return TEEC_ERROR_BAD_PARAMETERS;
			}
		}
		idx++;
	}
	set_params_stat = set_params(msgm, params);
	return set_params_stat;
}
开发者ID:acorn-marvell,项目名称:brillo_pxa_kernel,代码行数:29,代码来源:tee_msgm_ntw.c

示例9: invalid_params

void ParamsDialog::OnOK(wxCommandEvent & event) {
	const bool changed = pg_->CommitChangesFromEditor(); // ?
	wxArrayString params = invalid_params();
	if (!params.empty()) {display_invalid_params(params); return;}
	set_params();
	EndModal(wxID_OK);
	Close();
}
开发者ID:jcasse,项目名称:xperimenter,代码行数:8,代码来源:paramsdialog.cpp

示例10: initiate_language_command

int command::bind_query(std::auto_ptr<sybase_query> &q, const QoreListNode *args, ExceptionSink *xsink) {
   query.reset(q.release());

   initiate_language_command(query->buff(), xsink);

   if (args) set_params(*query, args, xsink);

   return 0;
}
开发者ID:qorelanguage,项目名称:module-sybase,代码行数:9,代码来源:command.cpp

示例11: set_dimensions

 friend void set_dimensions(sink& s, resolution r, aspect_ratio a) {
   rect dest = {0, 0, width(s.p->vm), height(s.p->vm)};
   double picture_aspect_ratio = r.width * a.n / r.height;
   auto w = dest.h * picture_aspect_ratio;
   if(w > dest.w) dest.h = dest.w / picture_aspect_ratio;
   if(dest.w < width(s.p->vm)) dest.x = (width(s.p->vm) - dest.w) / 2;
   if(dest.h < height(s.p->vm)) dest.y = (height(s.p->vm) - dest.h) / 2;
  
   set_params(s, s.p->vm, rect{0,0,r.width,r.height}, dest);
 }
开发者ID:RC-MODULE,项目名称:media.hpp,代码行数:10,代码来源:video.hpp

示例12: ParamPolicy

 MvReg::MultivariateRegressionModel(const Matrix &X, const Matrix &Y)
     : ParamPolicy(),
       DataPolicy(new MvRegSuf(X, Y)),
       PriorPolicy(),
       LoglikeModel() {
   uint nx = X.ncol();
   uint ny = Y.ncol();
   set_params(new MatrixGlmCoefs(nx, ny), new SpdParams(ny));
   mle();
 }
开发者ID:steve-the-bayesian,项目名称:BOOM,代码行数:10,代码来源:MultivariateRegression.cpp

示例13: delete_event

void delete_event (GtkWidget *widget, gpointer data)
{

  set_params();//retrieve parameters from entry fields
  do_synthesis();
  
	//free(param_list);
  	//gtk_widget_destroy (GTK_WIDGET (data));

}
开发者ID:rbrown49,项目名称:ats,代码行数:10,代码来源:get_sparams.c

示例14: tz_invoke

/*
 * tee_invoke_command - invoke TEE to invoke a GP TEE command
 */
static int tz_invoke(struct tee_session *sess, struct tee_cmd *cmd)
{
	struct tee *tee;
	struct tee_tz *ptee;
	int ret = 0;

	struct teesmc32_arg *arg32;
	uintptr_t parg32;
	struct teesmc32_param *params32;

	BUG_ON(!sess->ctx->tee);
	BUG_ON(!sess->ctx->tee->priv);
	tee = sess->ctx->tee;
	ptee = tee->priv;

	dev_dbg(DEV, "> sessid %x cmd %x type %x\n",
		sess->sessid, cmd->cmd, cmd->param.type);

	if (!CAPABLE(tee)) {
		dev_dbg(tee->dev, "< not capable\n");
		return -EBUSY;
	}

	arg32 = (typeof(arg32))alloc_tee_arg(ptee, &parg32,
			TEESMC32_GET_ARG_SIZE(TEEC_CONFIG_PAYLOAD_REF_COUNT));
	if (!arg32) {
		free_tee_arg(ptee, parg32);
		return TEEC_ERROR_OUT_OF_MEMORY;
	}

	memset(arg32, 0, sizeof(*arg32));
	arg32->num_params = TEEC_CONFIG_PAYLOAD_REF_COUNT;
	params32 = TEESMC32_GET_PARAMS(arg32);

	arg32->cmd = TEESMC_CMD_INVOKE_COMMAND;
	arg32->session = sess->sessid;
	arg32->ta_func = cmd->cmd;

	set_params(ptee, params32, cmd->param.type, &cmd->param);

	call_tee(ptee, parg32, arg32);

	get_params(&cmd->param, params32);

	if (arg32->ret != TEEC_ERROR_COMMUNICATION) {
		cmd->err = arg32->ret;
		cmd->origin = arg32->ret_origin;
	} else
		ret = -EBUSY;

	free_tee_arg(ptee, parg32);

	dev_dbg(DEV, "< %x:%d\n", arg32->ret, ret);
	return ret;
}
开发者ID:sunyanbang,项目名称:optee_linuxdriver,代码行数:58,代码来源:tee_tz_drv.c

示例15: D

bool ASERDPort::configure(uint16 config)
{
	D(bug(" configure %04lx\n", (uint32)config));
	if (is_parallel)
		return true;

	// Set number of stop bits
	switch (config & 0xc000) {
		case stop10:
			control_io->io_StopBits = 1;
			break;
		case stop20:
			control_io->io_StopBits = 2;
			break;
		default:
			return false;
	}

	// Set parity mode
	switch (config & 0x3000) {
		case noParity:
			control_io->io_SerFlags &= ~SERF_PARTY_ON;
			break;
		case oddParity:
			control_io->io_SerFlags |= SERF_PARTY_ON | SERF_PARTY_ODD;
			break;
		case evenParity:
			control_io->io_SerFlags |= SERF_PARTY_ON;
			control_io->io_SerFlags &= ~SERF_PARTY_ODD;
			break;
		default:
			return false;
	}

	// Set number of data bits
	switch (config & 0x0c00) {
		case data5:
			control_io->io_ReadLen = control_io->io_WriteLen = 5;
			break;
		case data6:
			control_io->io_ReadLen = control_io->io_WriteLen = 6;
			break;
		case data7:
			control_io->io_ReadLen = control_io->io_WriteLen = 7;
			break;
		case data8:
			control_io->io_ReadLen = control_io->io_WriteLen = 8;
			break;
	}

	// Set baud rate
	control_io->io_Baud = 115200 / ((config & 0x03ff) + 2);
	return set_params();
}
开发者ID:AlexandreCo,项目名称:macemu,代码行数:54,代码来源:serial_amiga.cpp


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