CMM-22 / a3

0 stars 0 forks source link

adversarial change vector #20

Open sigasserethz opened 2 years ago

sigasserethz commented 2 years ago

Is there a memeberfunction of eigen to remove a specific element, or to add a element at a specific place? I tried shifting values around with for loops and using conservativeresize, but this is to slow to run on my computer.

liyuesolo commented 2 years ago

not I'm aware of but how about switching the element you want to remove to the end of the vector and conservativeResize(current size - dim)? and when you add something just append it to the end?