Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd indexbase behavior #20

Open
fcarlosjr opened this issue Aug 15, 2016 · 0 comments
Open

Odd indexbase behavior #20

fcarlosjr opened this issue Aug 15, 2016 · 0 comments

Comments

@fcarlosjr
Copy link

Hi Michael,

I'm having a hard time trying to understand a weird behavior when using some custom Indexbase with my containers. To illustrate that, lets suppose I define two types of GeMatrix: a
GEMatrix6 with IndexBase 6, and a GEMatrix1 with IndexBase 1. Suppose I create
2 matrices of each type: GEMatrix6 A, and GEMatrix1 B. What is bothering me is
that if I do the following:

GEMatrix1 B = A;

the matrix B assumes the IndexBase of A (6), despite being of type GEMatrix1
(with IndexBase 1). The same goes if I do the following:

GEMatrix1 B;
B = A;

By contrast, if I do the following:

GEMatrix1 B(A.numRows(), A.numCols());
B = A;

then the matrix B assumes the IndexType of its type (1), as I expected in the
first place for all cases. Is this different behavior normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant