Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QcmpCompressionLibrary
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioinformaticDataCompression
QcmpCompressionLibrary
Commits
ffb98c89
Commit
ffb98c89
authored
5 years ago
by
Vojtech Moravec
Browse files
Options
Downloads
Patches
Plain Diff
Removed remaining DE code.
parent
dc7978ff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/azgracompress/benchmark/ScalarQuantizationBenchmark.java
+2
-37
2 additions, 37 deletions
.../azgracompress/benchmark/ScalarQuantizationBenchmark.java
with
2 additions
and
37 deletions
src/main/java/azgracompress/benchmark/ScalarQuantizationBenchmark.java
+
2
−
37
View file @
ffb98c89
...
@@ -14,8 +14,6 @@ import java.io.IOException;
...
@@ -14,8 +14,6 @@ import java.io.IOException;
import
java.io.OutputStreamWriter
;
import
java.io.OutputStreamWriter
;
public
class
ScalarQuantizationBenchmark
extends
BenchmarkBase
{
public
class
ScalarQuantizationBenchmark
extends
BenchmarkBase
{
private
boolean
useDiffEvolution
=
false
;
public
ScalarQuantizationBenchmark
(
final
String
inputFile
,
public
ScalarQuantizationBenchmark
(
final
String
inputFile
,
final
String
outputDirectory
,
final
String
outputDirectory
,
final
int
[]
planes
,
final
int
[]
planes
,
...
@@ -56,12 +54,7 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
...
@@ -56,12 +54,7 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
System
.
err
.
println
(
"Failed to load middle plane data."
);
System
.
err
.
println
(
"Failed to load middle plane data."
);
return
;
return
;
}
}
if
(
useDiffEvolution
)
{
quantizer
=
trainLloydMaxQuantizer
(
middlePlaneData
,
codebookSize
);
assert
(
false
)
:
"DE is depracated"
;
quantizer
=
null
;
}
else
{
quantizer
=
trainLloydMaxQuantizer
(
middlePlaneData
,
codebookSize
);
}
System
.
out
.
println
(
"Created quantizer from middle plane."
);
System
.
out
.
println
(
"Created quantizer from middle plane."
);
}
}
...
@@ -77,12 +70,7 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
...
@@ -77,12 +70,7 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
if
(!
hasGeneralQuantizer
)
{
if
(!
hasGeneralQuantizer
)
{
if
(
useDiffEvolution
)
{
quantizer
=
trainLloydMaxQuantizer
(
planeData
,
codebookSize
);
assert
(
false
)
:
"DE is depracated"
;
quantizer
=
null
;
}
else
{
quantizer
=
trainLloydMaxQuantizer
(
planeData
,
codebookSize
);
}
System
.
out
.
println
(
"Created plane quantizer"
);
System
.
out
.
println
(
"Created plane quantizer"
);
}
}
if
(
quantizer
==
null
)
{
if
(
quantizer
==
null
)
{
...
@@ -142,27 +130,4 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
...
@@ -142,27 +130,4 @@ public class ScalarQuantizationBenchmark extends BenchmarkBase {
// TODO(Moravec): FIXME
// TODO(Moravec): FIXME
return
new
ScalarQuantizer
(
U16
.
Min
,
U16
.
Max
,
null
);
//lloydMax.getCentroids());
return
new
ScalarQuantizer
(
U16
.
Min
,
U16
.
Max
,
null
);
//lloydMax.getCentroids());
}
}
// private ScalarQuantizer trainDifferentialEvolution(final int[] data,
// final int codebookSize) {
// ILShadeSolver ilshade = new ILShadeSolver(codebookSize, 100, 2000, 15);
// ilshade.setTrainingData(data);
//
// try {
// ilshade.train();
// } catch (DeException deEx) {
// deEx.printStackTrace();
// return null;
// }
// return new ScalarQuantizer(U16.Min, U16.Max, ilshade.getBestSolution().getAttributes());
// }
public
boolean
isUseDiffEvolution
()
{
return
useDiffEvolution
;
}
public
void
setUseDiffEvolution
(
boolean
useDiffEvolution
)
{
this
.
useDiffEvolution
=
useDiffEvolution
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment