How exactly do we set the value of an Eigen Vector or Matrix by index. I'm trying to do something similar to:
// Assume row major
matrix[i][j] = value
// or
vector[i] = value
I might have missed it, but could not find anything in the quick reference guide.
matrix(i,j)
orvector(i)
, if that's what you're looking for. – frslmauto train_loss_avg = Eigen::VectorXf::Zero(20); train_loss_avg(0) = 3.0;
is giving expression not assignable. – tangytrain_loss_avg[0] = 3.0;
throws the same error. – tangyauto
type. See Common pitfalls – chtz