本文整理汇总了C++中Noise::middleRows方法的典型用法代码示例。如果您正苦于以下问题:C++ Noise::middleRows方法的具体用法?C++ Noise::middleRows怎么用?C++ Noise::middleRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Noise
的用法示例。
在下文中一共展示了Noise::middleRows方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: predict_obsrv
void predict_obsrv(Tuple& models_tuple,
double delta_time,
const State& state,
const Noise& noise,
Obsrv& prediction,
const int obsrv_offset = 0,
const int state_offset = 0,
const int noise_offset = 0)
{
auto&& model = std::get<k>(models_tuple);
const auto obsrv_dim = model->obsrv_dimension();
const auto state_dim = model->state_dimension();
const auto noise_dim = model->noise_dimension();
prediction.middleRows(obsrv_offset, obsrv_dim) =
model->predict_obsrv(
state.middleRows(state_offset, state_dim),
noise.middleRows(noise_offset, noise_dim),
delta_time
);
if (Size == k + 1) return;
predict_obsrv<Size, k + (k + 1 < Size ? 1 : 0)>(
models_tuple,
delta_time,
state,
noise,
prediction,
obsrv_offset + obsrv_dim,
state_offset + state_dim,
noise_offset + noise_dim);
}
示例2: predict_state
void predict_state(Tuple& models_tuple,
double delta_time,
const State& state,
const Noise& noise,
const Input& input,
State& prediction,
const int state_offset = 0,
const int noise_offset = 0,
const int input_offset = 0)
{
auto&& model = std::get<k>(models_tuple);
const auto state_dim = model.state_dimension();
const auto noise_dim = model.noise_dimension();
const auto input_dim = model.input_dimension();
prediction.middleRows(state_offset, state_dim) =
model.predict_state(
delta_time,
state.middleRows(state_offset, state_dim),
noise.middleRows(noise_offset, noise_dim),
input.middleRows(input_offset, input_dim)
);
if (Size == k + 1) return;
predict_state<Size, k + (k + 1 < Size ? 1 : 0)>(
models_tuple,
delta_time,
state,
noise,
input,
prediction,
state_offset + state_dim,
noise_offset + noise_dim,
input_offset + input_dim);
}