I just posted a header file in the tracker that replicates the repmat function in matlab. There are two functions- one for replicating a matrix, and one for replicating a vector.
I had one question about how I was converting the vector into either a 1xn matrix or an nx1 matrix. It seems that I have to do either vector.T() or vector.T().T(). Is there a better way to do this?
As a side note- I haven't given up on the vector sorting. I am working on a few optimizations and will be uploading some code in a few days.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all, thanks for your contribution of the repmap() function. I will try to take care of it as soon as possible.
As for the conversion problem of vectors, you should know that vectors in IT++ are treated as column ones by default. So to have a matrix of size nx1 you just need to use Mat<> constructor, e.g.
vec v = randn(5);
mat M(v);
Eventually you can use reshape function:
mat M = reshape(v, v.size(), 1); // nx1 matrix
mat M = reshape(v, 1, v.size()); // 1xn matrix
BR,
/ediap
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I made a couple minor changes to the vector conversion, and have uploaded a new version of the repmat.h file to the tracker.
One last question- I am assuming the comments above each function are for automatically generated documentation. What software do you use, and is there a document that describes the various options (e.g.: \param describes an input parameter, \notes lets you attach notes).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just posted a header file in the tracker that replicates the repmat function in matlab. There are two functions- one for replicating a matrix, and one for replicating a vector.
I had one question about how I was converting the vector into either a 1xn matrix or an nx1 matrix. It seems that I have to do either vector.T() or vector.T().T(). Is there a better way to do this?
As a side note- I haven't given up on the vector sorting. I am working on a few optimizations and will be uploading some code in a few days.
Hi Mark,
First of all, thanks for your contribution of the repmap() function. I will try to take care of it as soon as possible.
As for the conversion problem of vectors, you should know that vectors in IT++ are treated as column ones by default. So to have a matrix of size nx1 you just need to use Mat<> constructor, e.g.
vec v = randn(5);
mat M(v);
Eventually you can use reshape function:
mat M = reshape(v, v.size(), 1); // nx1 matrix
mat M = reshape(v, 1, v.size()); // 1xn matrix
BR,
/ediap
Ok, I made a couple minor changes to the vector conversion, and have uploaded a new version of the repmat.h file to the tracker.
One last question- I am assuming the comments above each function are for automatically generated documentation. What software do you use, and is there a document that describes the various options (e.g.: \param describes an input parameter, \notes lets you attach notes).
We use Doxygen for generating the reference documentation in HTML format. More info on http://www.doxygen.org