Things.
This commit is contained in:
@@ -2,6 +2,7 @@ package huffman_coding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
import tester.Tester;
|
||||
|
||||
class Examples {
|
||||
@@ -41,13 +42,13 @@ class Huffman {
|
||||
ArrayList<Integer> freqs; // Frequencies of characters.
|
||||
|
||||
Huffman(ArrayList<String> charset, ArrayList<Integer> freqs) {
|
||||
if (charset.size() != freqs.size()) throw new IllegalArgumentException(
|
||||
"Character set must match frequencies."
|
||||
);
|
||||
if (charset.size() != freqs.size())
|
||||
throw new IllegalArgumentException(
|
||||
"Character set must match frequencies.");
|
||||
|
||||
if (charset.size() < 2) throw new IllegalArgumentException(
|
||||
"Character set too small."
|
||||
);
|
||||
if (charset.size() < 2)
|
||||
throw new IllegalArgumentException(
|
||||
"Character set too small.");
|
||||
|
||||
this.charset = charset;
|
||||
this.freqs = freqs;
|
||||
|
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="/home/jacob/Projects/CS3/libs/javalib.jar"/>
|
||||
<classpathentry kind="lib" path="/home/jacob/Projects/CS3/libs/tester.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
@@ -5,14 +5,8 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
|
Reference in New Issue
Block a user