Skip to content
Snippets Groups Projects

David

Open david.carballo requested to merge david.carballo/poo2019numeric:David into master
2 files
+ 17
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -77,15 +77,26 @@ final public class Vector {
}
public Vector sliceFrom(int i) {
throw new UnsupportedOperationException("This feature isn't implemented yet");
return slice (i,this.len());
}
public Vector sliceTo(int i) {
throw new UnsupportedOperationException("This feature isn't implemented yet");
return slice (0,i);
}
public Vector slice(int from, int to) {
throw new UnsupportedOperationException("This feature isn't implemented yet");
Vector v =new Vector();
if (from>=to){
return v;
}
else{
for (double d : this.lstVector.subList(from,to))
{
v.lstVector.add(d);
}
return v;
}
}
public Vector removed(int i) {
Loading