public class JacardIndex extends Object implements ReadWriteableASCII
| Modifier and Type | Field and Description |
|---|---|
long |
intersection
The number of words forming the intersection between now and historic
words
|
double |
jacardIndex
The jacard index is: J(A,B) = |intersection(A,B)| / |union(A,B)| for this
time period
|
long |
time
current time period
|
long |
union
The number of words forming the union between now and historic words
|
| Constructor and Description |
|---|
JacardIndex(long time,
long intersection,
long union) |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
boolean |
equals(Object other) |
static JacardIndex |
fromString(String next)
Read a new jacard index from a comma separated line
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
public long intersection
public long union
public long time
public double jacardIndex
public JacardIndex(long time, long intersection, long union)
time - intersection - union - public void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic static JacardIndex fromString(String next) throws IOException
next - IOException