11 samples.resize(4 * resolution, 2);
13 const Eigen::MatrixXd t = Eigen::VectorXd::LinSpaced(resolution, 0, 1);
14 samples.setConstant(-1);
17 samples.block(n, 0, resolution, 1) = Eigen::MatrixXd::Ones(resolution, 1);
18 samples.block(n, 1, resolution, 1) = t;
21 samples.block(n, 0, resolution, 1) = t;
22 samples.block(n, 1, resolution, 1) = Eigen::MatrixXd::Ones(resolution, 1);
25 samples.block(n, 0, resolution, 1) = Eigen::MatrixXd::Zero(resolution, 1);
26 samples.block(n, 1, resolution, 1) = t;
29 samples.block(n, 0, resolution, 1) = t;
30 samples.block(n, 1, resolution, 1) = Eigen::MatrixXd::Zero(resolution, 1);
33 assert(
long(n) == samples.rows());
34 assert(samples.minCoeff() >= 0);
35 assert(samples.maxCoeff() <= 1);
40 samples.resize(3 * resolution, 2);
42 const Eigen::MatrixXd t = Eigen::VectorXd::LinSpaced(resolution, 0, 1);
43 samples.setConstant(-1);
46 samples.block(n, 0, resolution, 1) = t;
47 samples.block(n, 1, resolution, 1) = Eigen::MatrixXd::Ones(resolution, 1) - t;
50 samples.block(n, 0, resolution, 1) = Eigen::MatrixXd::Zero(resolution, 1);
51 samples.block(n, 1, resolution, 1) = t;
54 samples.block(n, 0, resolution, 1) = t;
55 samples.block(n, 1, resolution, 1) = Eigen::MatrixXd::Zero(resolution, 1);
58 assert(
long(n) == samples.rows());
59 assert(samples.minCoeff() >= 0);
60 assert(samples.maxCoeff() <= 1);
65 samples.resize(6 * resolution, 3);
67 const Eigen::MatrixXd t = Eigen::VectorXd::LinSpaced(resolution, 0, 1);
68 const Eigen::MatrixXd oo = Eigen::VectorXd::Ones(resolution);
71 samples.block(ii * resolution, 0, resolution, 1) = t;
72 samples.block(ii * resolution, 1, resolution, 1).setZero();
73 samples.block(ii * resolution, 2, resolution, 1).setZero();
77 samples.block(ii * resolution, 0, resolution, 1).setZero();
78 samples.block(ii * resolution, 1, resolution, 1) = t;
79 samples.block(ii * resolution, 2, resolution, 1).setZero();
83 samples.block(ii * resolution, 0, resolution, 1).setZero();
84 samples.block(ii * resolution, 1, resolution, 1).setZero();
85 samples.block(ii * resolution, 2, resolution, 1) = t;
88 samples.block(ii * resolution, 0, resolution, 1) = oo - t;
89 samples.block(ii * resolution, 1, resolution, 1) = t;
90 samples.block(ii * resolution, 2, resolution, 1).setZero();
93 samples.block(ii * resolution, 0, resolution, 1).setZero();
94 samples.block(ii * resolution, 1, resolution, 1) = oo - t;
95 samples.block(ii * resolution, 2, resolution, 1) = t;
98 samples.block(ii * resolution, 0, resolution, 1) = t;
99 samples.block(ii * resolution, 1, resolution, 1).setZero();
100 samples.block(ii * resolution, 2, resolution, 1) = oo - t;
105 samples.resize(12 * resolution, 3);
106 const Eigen::MatrixXd t = Eigen::VectorXd::LinSpaced(resolution, 0, 1);
109 samples.block(ii * resolution, 0, resolution, 1) = t;
110 samples.block(ii * resolution, 1, resolution, 1).setZero();
111 samples.block(ii * resolution, 2, resolution, 1).setZero();
114 samples.block(ii * resolution, 0, resolution, 1) = t;
115 samples.block(ii * resolution, 1, resolution, 1).setOnes();
116 samples.block(ii * resolution, 2, resolution, 1).setZero();
119 samples.block(ii * resolution, 0, resolution, 1) = t;
120 samples.block(ii * resolution, 1, resolution, 1).setZero();
121 samples.block(ii * resolution, 2, resolution, 1).setOnes();
124 samples.block(ii * resolution, 0, resolution, 1) = t;
125 samples.block(ii * resolution, 1, resolution, 1).setOnes();
126 samples.block(ii * resolution, 2, resolution, 1).setOnes();
130 samples.block(ii * resolution, 0, resolution, 1).setZero();
131 samples.block(ii * resolution, 1, resolution, 1) = t;
132 samples.block(ii * resolution, 2, resolution, 1).setZero();
135 samples.block(ii * resolution, 0, resolution, 1).setOnes();
136 samples.block(ii * resolution, 1, resolution, 1) = t;
137 samples.block(ii * resolution, 2, resolution, 1).setZero();
140 samples.block(ii * resolution, 0, resolution, 1).setZero();
141 samples.block(ii * resolution, 1, resolution, 1) = t;
142 samples.block(ii * resolution, 2, resolution, 1).setOnes();
145 samples.block(ii * resolution, 0, resolution, 1).setOnes();
146 samples.block(ii * resolution, 1, resolution, 1) = t;
147 samples.block(ii * resolution, 2, resolution, 1).setOnes();
151 samples.block(ii * resolution, 0, resolution, 1).setZero();
152 samples.block(ii * resolution, 1, resolution, 1).setZero();
153 samples.block(ii * resolution, 2, resolution, 1) = t;
156 samples.block(ii * resolution, 0, resolution, 1).setOnes();
157 samples.block(ii * resolution, 1, resolution, 1).setZero();
158 samples.block(ii * resolution, 2, resolution, 1) = t;
161 samples.block(ii * resolution, 0, resolution, 1).setZero();
162 samples.block(ii * resolution, 1, resolution, 1).setOnes();
163 samples.block(ii * resolution, 2, resolution, 1) = t;
166 samples.block(ii * resolution, 0, resolution, 1).setOnes();
167 samples.block(ii * resolution, 1, resolution, 1).setOnes();
168 samples.block(ii * resolution, 2, resolution, 1) = t;