vanderbiltrobotics / covariance-tracker

A class for computing the covariance matrix in a window of incoming values.
MIT License
0 stars 1 forks source link

What is the purpose of the resize commands? #4

Closed AWatk closed 6 years ago

AWatk commented 6 years ago

Your eigen matrix has a dynamic column length, so wen are you needing to perform resizing and copying over into a new matrix?

Affected members:

setDataLength getUsed data_covered data_length

pertbanking commented 6 years ago

That was going to be used mainly for debugging. In a test run, we may want to switch how many values we store to determine the mean and the covariance, to see which one works the best. It would be easier than hard-coding a value and having to recompile

AWatk commented 6 years ago

Cool. If you wanted to implement something like what is suggested in #5, then you can make the resize functions private helpers and call them when _capacity changes (or have them change capacity). The public function exposed to the user would be something more descriptive and specific such as setCollectionWindow or setRunningAverageNumPoints or basic such as setNumPoints.

pertbanking commented 6 years ago

I deleted this. It was making implementation ten times more complicated. If they wanna change the length, they can create a new instance.