Skip to content
Snippets Groups Projects
Commit 9c7f6340 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Fix.

parent 825d7a03
Branches
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase { ...@@ -22,7 +22,7 @@ public class MeasurePlaneErrorFunction extends CustomFunctionBase {
@Override @Override
public boolean run() { public boolean run() {
final int channel = 1; final int channel = 0;
assert (channel == 0 || channel == 1); assert (channel == 0 || channel == 1);
final String comp_file = channel == 0 ? COMP_FILE_ch0 : COMP_FILE_ch1; final String comp_file = channel == 0 ? COMP_FILE_ch0 : COMP_FILE_ch1;
final String method = "sq"; final String method = "sq";
......
...@@ -24,12 +24,12 @@ public class LBGVectorQuantizer { ...@@ -24,12 +24,12 @@ public class LBGVectorQuantizer {
assert (vectors.length > 0) : "No training vectors provided"; assert (vectors.length > 0) : "No training vectors provided";
this.vectorSize = vectors[0].length; this.vectorSize = vectors[0].length;
final int[][] vectorsCopy = new int[vectors.length][vectorSize]; // final int[][] vectorsCopy = new int[vectors.length][vectorSize];
System.arraycopy(vectors, 0, vectorsCopy, 0, vectors.length); // System.arraycopy(vectors, 0, vectorsCopy, 0, vectors.length);
this.trainingVectors = new TrainingVector[vectors.length]; this.trainingVectors = new TrainingVector[vectors.length];
for (int i = 0; i < vectorsCopy.length; i++) { for (int i = 0; i < vectors.length; i++) {
trainingVectors[i] = new TrainingVector(vectorsCopy[i]); trainingVectors[i] = new TrainingVector(Arrays.copyOf(vectors[i],vectors[i].length));
} }
this.codebookSize = codebookSize; this.codebookSize = codebookSize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment