Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,10 @@ public int hashCode()
{
return this.getHashCode();
}

@Override
public float[] toArray() {
return get();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ default int getHashCode() {
}
return result;
}

default float[] toArray() {
final float[] arr = new float[length()];
for (int i = 0; i < length(); ++i) {
arr[i] = get(i);
}
return arr;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,9 @@ public boolean equals(Object o)
public int hashCode() {
return this.getHashCode();
}

@Override
public float[] toArray() {
return (float[])segment.heapBase().get();
}
}
Loading