/** * Description not yet available. * \param */ void dmatrix::colfill_randu_ni(const int &j,long int &n) { long int nn; nn=n; for (int i=rowmin(); i<=rowmax(); i++) { elem(i,j)=auto_rand(nn,1); } }
/** * Description not yet available. * \param */ void dmatrix::fill_randn_ni(long int& n) { long int nn=n; for (int i=rowmin(); i<=rowmax(); i++) { elem(i).fill_randn_ni(nn); nn+=2; } }
/** * Description not yet available. * \param */ void dvector::fill_randu_ni(long int& n) { long int nn; nn=n; for (int i=indexmin(); i<=indexmax(); i++) { elem(i)=auto_rand(nn,1); } }
int get_sizeoftype(AST ty) { switch (nodetype(ty)) { case tFUNC: return 0; case tARRAY: return get_ival(ty) * get_sizeoftype(elem(ty)); default: return 1; } }
/** * Description not yet available. * \param */ void dvector::fill_randn_ni(long int& n) { long int nn; nn=n; for (int i=indexmin(); i<=indexmax(); i++) { elem(i)=randn(nn); } }
/** * Description not yet available. * \param */ const dmatrix& d5_array::operator()(int i, int j, int k) const { if (i<indexmin()||i>indexmax()) { cerr << "Error index out of bounds in\n" "d3_array& d5_array::operator ( )" << endl; ad_exit(1); } return elem(i)(j,k); }
/** * Description not yet available. * \param */ const double& d5_array::operator()(int i, int j, int k, int l, int m) const { if (i<indexmin()||i>indexmax()) { cerr << "Error hslice index out of bounds in\n" "dvector& d5_array::operator ( )" << endl; ad_exit(1); } return elem(i)(j,k,l,m); }
FgMatrixC<T,ncols,nrows> transpose() const { FgMatrixC<T,ncols,nrows> tMat; for (uint ii=0; ii<nrows; ii++) for (uint jj=0; jj<ncols; jj++) tMat.elem(jj,ii) = elem(ii,jj); return tMat; }
/** * Description not yet available. * \param */ const dvar_matrix& dvar6_array::operator()(int i, int j, int k, int l) const { if (i<indexmin()||i>indexmax()) { cerr << "Error hslice index out of bounds in\n" "dvar-vector& dvar4_array::operator ( )" << endl; ad_exit(1); } return elem(i)(j,k,l); }
/** * Helper function to fill a matrix with arbitrary data. */ void fill_matrix_data(matrix_t *M, precision_t data[][M->cols]) { int i, j; for ( i = 0; i < M->rows; i++ ) { for ( j = 0; j < M->cols; j++ ) { elem(M, i, j) = data[i][j]; } } }
void search(Trav *t) { ElemList *idx; int i; ElemId id; unmatch(&elem(t->match)); t->match = 0; for (i=t->cur; i<=t->last; i++) { idx = index(gsp, searchSpaces[i]); id = traverse(idx, t, t->p); if (success) { match( &elem(id) ); t->match = id; t->cur = i; return; } } }
/** * Description not yet available. * \param */ const dvar3_array& dvar5_array::operator()(int i, int j) const { if (i<indexmin()||i>indexmax()) { cerr << "Error index out of bounds in\n" "dvar3_array& dvar5_array::operator ( )" << endl; ad_exit(1); } return elem(i)(j); }
static void print(Rcpp::NumericMatrix A) { for (int i = 0; i < A.nrow(); i++) { for (int j = 0; j < A.ncol(); j++) { printf("%9f ", elem(A, i, j)); } putchar('\n'); } }
/** * Description not yet available. * \param */ void dmatrix::rowfill_randu_ni(const int& i,long int& n) { long int nn; nn=n; for (int j=colmin(); j<=colmax(); j++) { elem(i,j)=auto_rand(nn,1); } }
namespace boost { namespace hana { struct Function { struct hana { struct operators : boost::hana::operators::of<Comparable> { }; }; }; template <typename Domain, typename Codomain, typename F, typename = operators::adl> struct function_type { struct hana { using datatype = Function; }; Domain dom; Codomain cod; F def; friend constexpr auto domain(function_type f) { return f.dom; } friend constexpr auto codomain(function_type f) { return f.cod; } template <typename X> constexpr auto operator()(X x) const { if (!elem(domain(*this), x)) throw std::domain_error{"use of a hana::function with an argument out of the domain"}; return def(x); } }; BOOST_HANA_CONSTEXPR_LAMBDA auto function = [](auto domain, auto codomain) { return [=](auto definition) { return function_type<decltype(domain), decltype(codomain), decltype(definition)>{ domain, codomain, definition }; }; }; BOOST_HANA_CONSTEXPR_LAMBDA auto frange = [](auto f) { // Note: that would be better handled by a set data structure, but // whatever for now. return foldl(transform(domain(f), f), make<Tuple>(), [](auto xs, auto x) { return if_(elem(xs, x), xs, prepend(x, xs)); }); }; template <> struct equal_impl<Function, Function> { template <typename F, typename G> static constexpr auto apply(F f, G g) { return domain(f) == domain(g) && all_of(domain(f), demux(equal)(f, g)); } }; }} // end namespace boost::hana
int fijaElemento(matriz * mtz, int fila, int columna, long double _Complex valor) { if (!mtz) return -1; assert(mtz->datos); if (fila<=0 || fila > mtz->filas || columna<=0 || columna > mtz->columnas) return -2; elem(mtz,fila,columna)=valor; return 0; }
void updatefunct_t::execute( const size_t& myidx, global_store& globals ) { for(size_t c=0; c<lines.size(); ++c) { vector<elemptr> trace; elemptr elem( model, myidx ); trace.push_back( elem ); DOCMD( lines[c], trace, *cmds, globals ); } }
/* Properties and methods */ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accDoDefaultAction(VARIANT varID) { showDebug(__FUNCTION__, accessible); if (!accessible->isValid()) return E_FAIL; AccessibleElement elem(varID.lVal, accessible); const bool res = elem.iface ? elem.iface->doAction(DefaultAction, elem.entry, QVariantList()) : false; return res ? S_OK : S_FALSE; }
/** * Description not yet available. * \param */ d4_array& d5_array::operator ( ) (int i) { if (i < indexmin() || i > indexmax()) { ADMB_ARRAY_BOUNDS_ERROR("index out of bounds", "d4_array& d5_array::operator()(int i)", indexmin(), indexmax(), i); } //return t[i]; return elem(i); }
/** * Description not yet available. * \param */ d3_array& d5_array::operator ( ) (int i, int j) { if (i < indexmin() || i > indexmax()) { ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds", "d3_array& d5_array::operator[](int i, int j)", indexmin(), indexmax(), i); } return elem(i)(j); }
/** * Description not yet available. * \param */ const prevariable dvar6_array::operator()(int i, int j, int k, int l, int m, int n) const { if (i<indexmin()||i>indexmax()) { cerr << "Error hslice index out of bounds in\n" "prevariable& dvar4_array::operator ( )" << endl; ad_exit(1); } return elem(i)(j,k,l,m,n); }
/** * Description not yet available. * \param */ dvar3_array& dvar6_array::operator ( ) (int i,int j,int k) { if (i < indexmin() || i > indexmax()) { ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds", "dvar5_array& dvar6_array::operator()(int i, int j, int k)", indexmin(), indexmax(), i); } return elem(i)(j,k); }
/** * Description not yet available. * \param */ dvar_vector& dvar6_array::operator ( ) (int i,int j,int k,int l,int m) { if (i < indexmin() || i > indexmax()) { ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds", "dvar_vector& dvar6_array::operator()(int i, int j, int k, int l, int m)", indexmin(), indexmax(), i); } return elem(i)(j,k,l,m); }
void SkSVGDevice::drawPath(const SkDraw& draw, const SkPath& path, const SkPaint& paint, const SkMatrix* prePathMatrix, bool pathIsMutable) { AutoElement elem("path", fWriter, fResourceBucket, draw, paint); elem.addPathAttributes(path); // TODO: inverse fill types? if (path.getFillType() == SkPath::kEvenOdd_FillType) { elem.addAttribute("fill-rule", "evenodd"); } }
void paradiseo::smp::Island<EOAlgo,EOT,bEOT>::check() { // Sending for(PolicyElement<EOT>& elem : migPolicy) if(!elem(pop)) send(elem.getSelect()); // Receiving receive(); }
T pop() { if (c.empty()) { throw ReadEmptyQueue(); } T elem(c.front()); c.pop_front(); return elem; }
void SkSVGDevice::drawText(const SkDraw& draw, const void* text, size_t len, SkScalar x, SkScalar y, const SkPaint& paint) { AutoElement elem("text", fWriter, fResourceBucket, draw, paint); elem.addTextAttributes(paint); SVGTextBuilder builder(text, len, paint, SkPoint::Make(x, y), 0); elem.addAttribute("x", builder.posX()); elem.addAttribute("y", builder.posY()); elem.addText(builder.text()); }
/** * Description not yet available. * \param */ void dvar3_array::initialize() { if (!(!(*this))) // only initialize allocated objects { for (int i=slicemin();i<=slicemax();i++) { elem(i).initialize(); } } }
/** * Description not yet available. * \param */ void dvar3_array::fill_randu_ni(long int& n) { long int nn; nn=n; for (int i=slicemin(); i<=slicemax(); i++) { elem(i).fill_randu_ni(nn); nn+=2; } }
void CEntity::setAttribute(CEntity *info) { TAttrList::const_iterator it = info->_attributes.begin(); for(;it!=info->_attributes.end();++it){ //buscamos por si ya existia el atributo y hay que modificarlo TAttrList::const_iterator it2 = _attributes.find((*it).first); if(it2!=_attributes.end()){//si lo ha encontrado ... //lo eliminamos de la tabla (para no dejar rastro) _attributes.erase(it2); //metemos los valores nuevos en la tabla TSSPar elem((*it).first, (*it).second); _attributes.insert(elem); }else{// si no lo ha encotnrado TSSPar elem((*it).first, (*it).second); _attributes.insert(elem); } } } // setAttribute