vkostyukov / la4j

Linear Algebra for Java
http://la4j.org
Apache License 2.0
373 stars 108 forks source link

Slicing w/o copying (Views) #185

Open vkostyukov opened 10 years ago

vkostyukov commented 10 years ago

There are a couple of operations in matrix/vector interface that involves full copying - getRow/getColumn and slice operations sliceX. I should think of either making these operations fast of providing an alternative way doing the same task w/ coping. It usually called view. Like this:

Matrix {
  Vector getRowView();
  Vector getColumnView();
  Vector toRowVectorView();
  Vector toColumnVectorView();
  Matrix sliceView();
  Matrix sliceLeftView();
  Matrix sliceRightView();
  Matrix selectView();
}