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


C++ reconstruct函数代码示例

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


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

示例1: initCompute

template<typename PointT> inline void
pcl::PCA<PointT>::reconstruct (const PointCloud& projection, PointCloud& input)
{
    if(!compute_done_)
        initCompute ();
    if (!compute_done_)
        PCL_THROW_EXCEPTION (InitFailedException, "[pcl::PCA::reconstruct] PCA initCompute failed");
    if (input.is_dense)
    {
        input.resize (projection.size ());
        for (size_t i = 0; i < projection.size (); ++i)
            reconstruct (projection[i], input[i]);
    }
    else
    {
        PointT p;
        for (size_t i = 0; i < input.size (); ++i)
        {
            if (!pcl_isfinite (input[i].x) ||
                    !pcl_isfinite (input[i].y) ||
                    !pcl_isfinite (input[i].z))
                continue;
            reconstruct (projection[i], p);
            input.push_back (p);
        }
    }
}
开发者ID:hitsjt,项目名称:StanfordPCL,代码行数:27,代码来源:pca.hpp

示例2: from_mat_ZZ_p_crt_rep

void from_mat_ZZ_p_crt_rep(const mat_ZZ_p_crt_rep& X, mat_ZZ_p& A)
{
   long n = X.rep[0].NumRows();
   long m = X.rep[0].NumCols();

   const MatPrime_crt_helper& H = get_MatPrime_crt_helper_info();
   long nprimes = H.GetNumPrimes();

   if (NTL_OVERFLOW(nprimes, CRT_BLK, 0))
      ResourceError("overflow"); // this is pretty academic

   A.SetDims(n, m);

   ZZ_pContext context;
   context.save();

   bool seq = (double(n)*double(m)*H.GetCost() < PAR_THRESH);

   // FIXME: right now, we just partition the rows, but if
   // #cols > #rows, we should perhaps partition the cols
   NTL_GEXEC_RANGE(seq, n, first, last)
   NTL_IMPORT(n)
   NTL_IMPORT(m)
   NTL_IMPORT(nprimes)

   context.restore();

   MatPrime_crt_helper_scratch scratch;
   Vec<MatPrime_residue_t> remainders_store;
   remainders_store.SetLength(nprimes*CRT_BLK);
   MatPrime_residue_t *remainders = remainders_store.elts();

   for (long i = first; i < last; i++) {
      ZZ_p *a = A[i].elts();

      long jj = 0; 
      for (; jj <= m-CRT_BLK; jj += CRT_BLK) {
         for (long k = 0; k < nprimes; k++) {
            const MatPrime_residue_t *x = X.rep[k][i].elts();
            for (long j = 0; j < CRT_BLK; j++)
               remainders[j*nprimes+k] = x[jj+j];
         }
         for (long j = 0; j < CRT_BLK; j++)
            reconstruct(H, a[jj+j].LoopHole(), remainders + j*nprimes, scratch);
      }
      if (jj < m) {
         for (long k = 0; k < nprimes; k++) {
            const MatPrime_residue_t *x = X.rep[k][i].elts();
            for (long j = 0; j < m-jj; j++)
               remainders[j*nprimes+k] = x[jj+j];
         }
         for (long j = 0; j < m-jj; j++)
            reconstruct(H, a[jj+j].LoopHole(), remainders + j*nprimes, scratch);
      }
   }

   NTL_GEXEC_RANGE_END
}
开发者ID:tell,项目名称:ntl-unix,代码行数:58,代码来源:mat_ZZ_p.cpp

示例3: reconstruct

/* 新規の文字列オブジェクトを作成する */
void ITextRenderer::NewText(unsigned int ID, const std::wstring& str, int x, int y, float scale, float width, ArgbColor color) {
	if (StringData.size() <= ID) StringData.resize(ID + 1, nullptr); // 配列の拡張
	bool TextChanged = (!StringData[ID]) || (StringData[ID]->str != str);
	if (StringData[ID] && TextChanged) delete StringData[ID]; // 既に存在した場合
	if (TextChanged) StringData[ID] = new StringAttr;
	StringData[ID]->X = x; StringData[ID]->Y = y;
	StringData[ID]->scale = scale; StringData[ID]->width = width;
	StringData[ID]->color = color;
	if (TextChanged) {
		StringData[ID]->str = std::wstring(str);
		reconstruct(ID, true);
	} else {
		reconstruct(ID, false);
	}
}
开发者ID:wheein,项目名称:MiHaJong,代码行数:16,代码来源:text.cpp

示例4: startReconstruction

int startReconstruction(){

	int return_value = 0;
	char str[200];

	FILE *dataFile = fopen(sinoPath,"r");
	logIt(DEBUG, "startReconstruction() started.");
	//Read P2
	fgets(str, 200, dataFile);
	if(!(str[0] == 'P' && str[1] == '2')){
		logIt(ERR, "Not a pgm.");
		return 1;
	}


	fgets(str, 200, dataFile); //Hopefully a commentary
	fscanf(dataFile,"%d",&imgwidth);
	fscanf(dataFile,"%d",&numangles);
	logIt(TRACE, "width: %d, angles: %d", imgwidth, numangles);
	fgets(str, 200, dataFile);

	fgets(str, 200, dataFile);//colordepth, we dont care about


	imgheight = 512;		//This is the height of the reconstructed image.

	return_value = reconstruct(dataFile);

	logIt(DEBUG, "startReconstruction() finished.");
	return return_value;
}
开发者ID:Axelius,项目名称:CTSim,代码行数:31,代码来源:ReconstructC.c

示例5: scale_reconstruction_impl

    void scale_reconstruction_impl(Point_collection & input,
                                   viennagrid::mesh output,
                                   scale_options options)
    {
      typedef Reconstruction::Triple_const_iterator                   Triple_iterator;
      // Construct the reconstruction with parameters for
      // the neighborhood squared radius estimation.
      Reconstruction reconstruct( options.neighborhood_size, options.sample_size );
      // Add the points.
      reconstruct.insert( input.begin(), input.end() );
      // Advance the scale-space several steps.
      // This automatically estimates the scale-space.
      reconstruct.increase_scale( options.scale );

      typedef viennagrid::mesh                                   MeshType;
      typedef viennagrid::result_of::element<MeshType>::type    VertexType;
      std::vector<VertexType> vertex_handles(input.size());
      int i=0;

      for(Point_collection::iterator begin = input.begin();begin!=input.end();++begin,++i)
        vertex_handles[i] = viennagrid::make_vertex( output,
          viennagrid::make_point(begin->x(),begin->y(),begin->z()));

      for( std::size_t shell = 0; shell < reconstruct.number_of_shells(); ++shell )
        for( Triple_iterator it = reconstruct.shell_begin( shell ); it != reconstruct.shell_end( shell ); ++it )
        {
          viennagrid::make_triangle(
            output,vertex_handles[(*it)[0]],
                   vertex_handles[(*it)[1]],
                   vertex_handles[(*it)[2]]);
        }
    }
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:32,代码来源:scale_reconstruction.cpp

示例6: g726_24_decoder

/*
 * g723_24_decoder()
 *
 * Decodes a 3-bit CCITT G.723_24 ADPCM code and returns
 * the resulting 16-bit linear PCM, A-law or u-law sample value.
 * -1 is returned if the output coding is unknown.
 */
int
g726_24_decoder(
	int		i,
	g726_state *state_ptr)
{
	int		sezi;
	int		sez;			/* ACCUM */
	int		sei;
	int		se;
	int		y;				/* MIX */
	int		dq;
	int		sr;				/* ADDB */
	int		dqsez;

	i &= 0x07;				/* mask to get proper bits */
	sezi = predictor_zero(state_ptr);
	sez = sezi >> 1;
	sei = sezi + predictor_pole(state_ptr);
	se = sei >> 1;			/* se = estimated signal */

	y = step_size(state_ptr);	/* adaptive quantizer step size */
	dq = reconstruct(i & 0x04, _dqlntab[i], y); /* unquantize pred diff */

	sr = (dq < 0) ? (se - (dq & 0x3FFF)) : (se + dq); /* reconst. signal */

	dqsez = sr - se + sez;			/* pole prediction diff. */

	update(3, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);

	return (sr << 2);	/* sr was of 14-bit dynamic range */
}
开发者ID:BigHNF,项目名称:tcpmp-revive,代码行数:38,代码来源:g726_24.c

示例7: reconstruct

reconstruct(int size, int t[][size+1], int i, int kp, int w[])
{
	if(i==0)
	{
		return;
	}
	if(t[i][kp] > t[i-1][kp])
	{
		printf("Item %d\n",i);
		reconstruct(size, t, i-1, kp -w[i],w);
	}
	else
	{
		reconstruct(size, t, i-1,kp,w);
	}
}
开发者ID:archanar1224,项目名称:test-repo,代码行数:16,代码来源:1_knapsack.c

示例8: reconstruct

reconstruct(int size, int t[][size+1], int i, int sum, int a[])
{
	if(sum==0)
	{
		return;
	}
	if(t[i][sum] > t[i-1][sum])
	{
		printf(" %d ",a[i]);
		reconstruct(size, t, i-1, sum - a[i], a);
	}
	else
	{
		reconstruct(size, t, i-1, sum, a);
	}
}
开发者ID:archanar1224,项目名称:test-repo,代码行数:16,代码来源:3_subset_sum.c

示例9: g723_40_encoder

/*
 * g723_40_encoder()
 *
 * Encodes a 16-bit linear PCM, A-law or u-law input sample and retuens
 * the resulting 5-bit CCITT G.723 40Kbps code.
 * Returns -1 if the input coding value is invalid.
 */
int	g723_40_encoder (int sl, G72x_STATE *state_ptr)
{
	short		sei, sezi, se, sez;	/* ACCUM */
	short		d;			/* SUBTA */
	short		y;			/* MIX */
	short		sr;			/* ADDB */
	short		dqsez;			/* ADDC */
	short		dq, i;

	/* linearize input sample to 14-bit PCM */
	sl >>= 2;		/* sl of 14-bit dynamic range */

	sezi = predictor_zero(state_ptr);
	sez = sezi >> 1;
	sei = sezi + predictor_pole(state_ptr);
	se = sei >> 1;			/* se = estimated signal */

	d = sl - se;			/* d = estimation difference */

	/* quantize prediction difference */
	y = step_size(state_ptr);	/* adaptive quantizer step size */
	i = quantize(d, y, qtab_723_40, 15);	/* i = ADPCM code */

	dq = reconstruct(i & 0x10, _dqlntab[i], y);	/* quantized diff */

	sr = (dq < 0) ? se - (dq & 0x7FFF) : se + dq; /* reconstructed signal */

	dqsez = sr + sez - se;		/* dqsez = pole prediction diff. */

	update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);

	return (i);
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:40,代码来源:g723_40.c

示例10: reconstruct

	void reconstruct(const vt& ax, const vt& bx, //
			const vt& ay, const vt& by,  //
			const vt& az = 0, const vt& bz = 0) {
		Point s(ax, ay, az);
		Point e(bx, by, bz);
		reconstruct(s, e);
	}
开发者ID:hyperpower,项目名称:carpio,代码行数:7,代码来源:_segment.hpp

示例11: reconstruct

void PushDown::setup() {
    
    seed.addListener(this, &PushDown::reconstruct<int>);
    numCells.addListener(this, &PushDown::reconstruct<int>);
    
    reconstruct();
}
开发者ID:RecoilPerformanceGroup,项目名称:Stereo2016,代码行数:7,代码来源:PushDown.cpp

示例12: reconstruct

string Puzzle::reconstruct(const State *const state){
	if(state->getPrev()==NULL){
		return "";
	}else{
		return reconstruct(state->getPrev())+" "+state->getPrev()->getMove(state);
	}
}
开发者ID:nbarriga,项目名称:safarirushhour,代码行数:7,代码来源:Puzzle.cpp

示例13: predictor_zero

/*
 * g723_40_decoder()
 *
 * Decodes a 5-bit CCITT G.723 40Kbps code and returns
 * the resulting 16-bit linear PCM, A-law or u-law sample value.
 * -1 is returned if the output coding is unknown.
 */
int	g723_40_decoder	(int i, G72x_STATE *state_ptr)
{
	short		sezi, sei, sez, se;	/* ACCUM */
	short		y ;			/* MIX */
	short		sr;			/* ADDB */
	short		dq;
	short		dqsez;

	i &= 0x1f;			/* mask to get proper bits */
	sezi = predictor_zero(state_ptr);
	sez = sezi >> 1;
	sei = sezi + predictor_pole(state_ptr);
	se = sei >> 1;			/* se = estimated signal */

	y = step_size(state_ptr);	/* adaptive quantizer step size */
	dq = reconstruct(i & 0x10, _dqlntab[i], y);	/* estimation diff. */

	sr = (dq < 0) ? (se - (dq & 0x7FFF)) : (se + dq); /* reconst. signal */

	dqsez = sr - se + sez;		/* pole prediction diff. */

	update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);

	return (sr << 2);	/* sr was of 14-bit dynamic range */
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:32,代码来源:g723_40.c

示例14: search

		//Perform a breadth first search
		static std::vector<edge_t> search(const edges_t& graph, const object_t start, const object_t end)
		{
			std::queue<object_t> q; //queue
			std::set<object_t> m; //set of marked id_t's
			edges_t h;
			
			m.insert(start);
			q.emplace(start);
			
			while(!q.empty())
			{
				id_t t = q.front();
				q.pop();
				
				if(t == end)
					return reconstruct(h, start, end);
				
				for(const edge_t& e : graph)
				{
					if(e.first == t && m.find(e.second) == m.end())
					{
						m.insert(e.second);
						q.emplace(e.second);
						h.emplace_back(e);
					}
				}
			}
			
			throw std::runtime_error("No path from start to end");
		}
开发者ID:Wassasin,项目名称:uppaal2octopus,代码行数:31,代码来源:path_finder.hpp

示例15: g721_encoder

/*
 * g721_encoder()
 *
 * Encodes the input vale of linear PCM, A-law or u-law data sl and returns
 * the resulting code. -1 is returned for unknown input coding value.
 */
int
g721_encoder(
	int		sl,
	G72x_STATE *state_ptr)
{
	short		sezi, se, sez;		/* ACCUM */
	short		d;			/* SUBTA */
	short		sr;			/* ADDB */
	short		y;			/* MIX */
	short		dqsez;			/* ADDC */
	short		dq, i;

	/* linearize input sample to 14-bit PCM */
	sl >>= 2;			/* 14-bit dynamic range */

	sezi = predictor_zero(state_ptr);
	sez = sezi >> 1;
	se = (sezi + predictor_pole(state_ptr)) >> 1;	/* estimated signal */

	d = sl - se;				/* estimation difference */

	/* quantize the prediction difference */
	y = step_size(state_ptr);		/* quantizer step size */
	i = quantize(d, y, qtab_721, 7);	/* i = ADPCM code */

	dq = reconstruct(i & 8, _dqlntab[i], y);	/* quantized est diff */

	sr = (dq < 0) ? se - (dq & 0x3FFF) : se + dq;	/* reconst. signal */

	dqsez = sr + sez - se;			/* pole prediction diff. */

	update(4, y, _witab[i] << 5, _fitab[i], dq, sr, dqsez, state_ptr);

	return (i);
}
开发者ID:AchimTuran,项目名称:viper4android_fx,代码行数:41,代码来源:g721.c


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