Skip to content
Snippets Groups Projects
Commit d637b363 authored by fefe's avatar fefe
Browse files

Function t()

parent 37ebafdb
Branches
Tags
No related merge requests found
...@@ -19,7 +19,7 @@ final public class Vector { ...@@ -19,7 +19,7 @@ final public class Vector {
} }
public Transposed t() { public Transposed t() {
throw new UnsupportedOperationException("This feature isn't implemented yet"); return new Transposed(this);
} }
public int len() { public int len() {
...@@ -32,6 +32,10 @@ final public class Vector { ...@@ -32,6 +32,10 @@ final public class Vector {
void set(int i, double value) { void set(int i, double value) {
this.values.set(i, value); this.values.set(i, value);
} }
private List<Double> getValues(){
return this.values;
}
public Vector add(Vector that) { public Vector add(Vector that) {
List<Double> newVec = new ArrayList<>(); List<Double> newVec = new ArrayList<>();
...@@ -42,7 +46,9 @@ final public class Vector { ...@@ -42,7 +46,9 @@ final public class Vector {
} }
public Vector mul(double m) { public Vector mul(double m) {
throw new UnsupportedOperationException("This feature isn't implemented yet"); //List<Double> newVec = new ArrayList<>();
//for (elem : this.get()){newVec.add(elem*m);}
//return new Vector(newVec);
} }
public Vector sub(Vector that) { public Vector sub(Vector that) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment