Avoid some array copying in add and subtract ArrayFieldVector.
JIRA: MATH-573 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1101579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d84695d151
commit
8ef3dd0269
|
@ -383,7 +383,7 @@ public class ArrayFieldVector<T extends FieldElement<T>> implements FieldVector<
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
out[i] = data[i].add(v.getEntry(i));
|
out[i] = data[i].add(v.getEntry(i));
|
||||||
}
|
}
|
||||||
return new ArrayFieldVector<T>(out);
|
return new ArrayFieldVector<T>(field, out, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ public class ArrayFieldVector<T extends FieldElement<T>> implements FieldVector<
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
out[i] = data[i].add(v[i]);
|
out[i] = data[i].add(v[i]);
|
||||||
}
|
}
|
||||||
return new ArrayFieldVector<T>(out);
|
return new ArrayFieldVector<T>(field, out, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -417,7 +417,7 @@ public class ArrayFieldVector<T extends FieldElement<T>> implements FieldVector<
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
out[i] = data[i].subtract(v.getEntry(i));
|
out[i] = data[i].subtract(v.getEntry(i));
|
||||||
}
|
}
|
||||||
return new ArrayFieldVector<T>(out);
|
return new ArrayFieldVector<T>(field, out, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ public class ArrayFieldVector<T extends FieldElement<T>> implements FieldVector<
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
out[i] = data[i].subtract(v[i]);
|
out[i] = data[i].subtract(v[i]);
|
||||||
}
|
}
|
||||||
return new ArrayFieldVector<T>(out);
|
return new ArrayFieldVector<T>(field, out, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -52,6 +52,9 @@ The <action> type attribute can be add,update,fix,remove.
|
||||||
If the output is not quite correct, check for invisible trailing spaces!
|
If the output is not quite correct, check for invisible trailing spaces!
|
||||||
-->
|
-->
|
||||||
<release version="3.0" date="TBD" description="TBD">
|
<release version="3.0" date="TBD" description="TBD">
|
||||||
|
<action dev="luc" type="fix" issue="MATH-573">
|
||||||
|
Avoid some array copying in add and subtract ArrayFieldVector.
|
||||||
|
</action>
|
||||||
<action dev="luc" type="fix" issue="MATH-572">
|
<action dev="luc" type="fix" issue="MATH-572">
|
||||||
Fixed an unused constructor parameter in ArrayFieldVector.
|
Fixed an unused constructor parameter in ArrayFieldVector.
|
||||||
</action>
|
</action>
|
||||||
|
|
Loading…
Reference in New Issue