C ++如何生成n维元组的笛卡尔积 [英] C++ How to generate the set of cartesian product of n-dimensional tuples

查看:161
本文介绍了C ++如何生成n维元组的笛卡尔积的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望生成一些数据,这些数据代表点云的坐标,这些点代表n个维度的n多维数据集.这些点应均匀地分布在整个n空间中,并且应能够在它们之间以用户定义的间距生成.这些数据将存储在数组中.

I wish to generate some data that represents the co-ordinates of a cloud of points representing an n-cube of n dimensions. These points should be evenly distributed throughout the n-space and should be able to be generated with a user-defined spacing between them. This data will be stored in an array.

推荐答案

我发现了 Boost中也有实际的笛卡尔积,但这是一个预处理程序指令,我认为它对您没有用.

There is an actual Cartesian product in Boost as well but that is a preprocessor directive, I assume it is of no use for you.

这篇关于C ++如何生成n维元组的笛卡尔积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆