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

Matrix put with ranges #75

Open
GooKv opened this issue Feb 18, 2016 · 1 comment
Open

Matrix put with ranges #75

GooKv opened this issue Feb 18, 2016 · 1 comment
Labels
accepted This sounds like something to look into.
Projects

Comments

@GooKv
Copy link

GooKv commented Feb 18, 2016

These checks assume sizes of ranges to have exactly the same size as the matrix has. This way it is impossible to fill some part of the matrix with the other one (say a vector), you can only fill the whole matrix with the other one of the same size.

public DoubleMatrix put(Range rs, Range cs, DoubleMatrix x) {
        rs.init(0, rows);
        cs.init(0, columns);

        x.checkRows(rs.length());
        x.checkColumns(cs.length());

        for (; rs.hasMore(); rs.next()) {
            cs.init(0, columns);
            for (; cs.hasMore(); cs.next()) {
                put(rs.value(), cs.value(), x.get(rs.index(), cs.index()));
            }
        }

        return this;
    }
@mikiobraun
Copy link
Member

Odd, let me look into this.

@mikiobraun mikiobraun added the accepted This sounds like something to look into. label Aug 25, 2020
@mikiobraun mikiobraun added this to Backlog in Task board Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This sounds like something to look into.
Projects
Task board
Backlog
Development

No branches or pull requests

2 participants