public class NormArgumentMap
extends java.lang.Object
Constructor and Description |
---|
NormArgumentMap(Norm n,
double alpha,
Spectrum spec)
Creates a new norm argument map
|
NormArgumentMap(Norm n,
double alpha,
Spectrum spec,
ImportanceFunction i)
Creates a new norm argument map
|
NormArgumentMap(Norm n,
Spectrum spec)
Creates a new norm argument map
|
NormArgumentMap(Norm n,
Spectrum spec,
ImportanceFunction i)
Creates a new norm argument map
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(Argument a,
java.lang.Boolean positive)
Adds an argument to one of the two argument sets
|
void |
addArgument(java.lang.String a,
java.lang.Boolean positive)
Creates and adds a new argument to one of the two argument sets
|
ImportanceFunction |
getImportanceFunction() |
ArgumentSet |
getNegativeArgs() |
java.lang.String |
getNorm() |
ArgumentSet |
getPositiveArgs() |
Spectrum |
getSpec() |
static NormArgumentMap |
loadFile(java.io.File f)
Loads the norm argument map from a norm argument map file
|
double |
minimumOpinions()
Computes the minimum number of opinions that an argument has to have to be considered alpha-relevant taking the norm argument map's alpha
|
double |
minimumOpinions(double alpha)
Computes the minimum number of opinions that an argument has to have to be considered alpha-relevant
|
double |
numberOpinions(java.lang.Boolean relevant)
Computes the number of (all/alpha-relevant) argument's opinions in the norm argument map
|
void |
printStatus(java.io.PrintStream out)
Prints the status of all the norm argument map, that is the status of each argument set (including the status of each argument in the set) and the support for the norm
|
void |
setNorm(java.lang.String s) |
double |
support()
Computes the overall support for the norm using the norm argument map's alpha to compute the alpha-relevant arguments
|
double |
support(double alpha)
Computes the overall norm support
|
public NormArgumentMap(Norm n, Spectrum spec)
n
- the norm argument map's normspec
- the norm argument map's spectrumpublic NormArgumentMap(Norm n, Spectrum spec, ImportanceFunction i)
n
- the norm argument map's normspec
- the norm argument map's spectrumi
- the norm argument map's importance functionpublic NormArgumentMap(Norm n, double alpha, Spectrum spec)
n
- the norm argument map's normalpha
- the norm argument map's alphaspec
- the norm argument map's spectrumpublic NormArgumentMap(Norm n, double alpha, Spectrum spec, ImportanceFunction i)
n
- the norm argument map's normalpha
- the norm argument map's alphaspec
- the norm argument map's spectrumi
- the norm argument map's importance functionpublic void addArgument(Argument a, java.lang.Boolean positive)
a
- the argument to addpositive
- the set to add it to (true for positive arguments, false for negative arguments)public void addArgument(java.lang.String a, java.lang.Boolean positive)
a
- the string to create the argument to addpositive
- the set to add it to (true for positive arguments, false for negative arguments)public double numberOpinions(java.lang.Boolean relevant)
relevant
- If true returns the number of all the alpha-relevant argument's opinions, otherwise the number of opinions of all the argumentspublic double minimumOpinions(double alpha)
alpha
- the alpha to be considered alpha-relevantpublic double minimumOpinions()
public double support(double alpha)
alpha
- the alpha to compute the alpha-relevant argumentspublic double support()
public void printStatus(java.io.PrintStream out)
out
- The PrintStream in which the information is printedpublic static NormArgumentMap loadFile(java.io.File f) throws java.io.FileNotFoundException
f
- The file to load (has to be a norm argument map file as defined in the project associated)java.io.FileNotFoundException
- If the file cannot be found to be readpublic java.lang.String getNorm()
public void setNorm(java.lang.String s)
public ArgumentSet getPositiveArgs()
public ArgumentSet getNegativeArgs()
public ImportanceFunction getImportanceFunction()
public Spectrum getSpec()