BrightSide Workbench Full Report + Source Code
org.turro.matching.MatchingSet Class Reference
Inheritance diagram for org.turro.matching.MatchingSet:
Collaboration diagram for org.turro.matching.MatchingSet:

Public Member Functions

void addMissing (List< IndicatorVariable > variables)
 
boolean hasVariable (IndicatorVariable variable)
 
double applyFrom (String formula)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file MatchingSet.java.

Member Function Documentation

◆ addMissing()

void org.turro.matching.MatchingSet.addMissing ( List< IndicatorVariable variables)

Definition at line 34 of file MatchingSet.java.

34  {
35  for(IndicatorVariable variable : variables) {
36  if(!hasVariable(variable)) {
37  add(new GenericMatching("missing", "missing", variable.getName(), variable.getMissingValue()));
38  }
39  }
40  }
boolean hasVariable(IndicatorVariable variable)
Here is the call graph for this function:

◆ applyFrom()

double org.turro.matching.MatchingSet.applyFrom ( String  formula)

Definition at line 46 of file MatchingSet.java.

46  {
47  if(!Strings.isBlank(formula)) {
48  Script script = new Script();
49  script.addMethodsFromClass(StatisticsFunctions.class);
50  for(IMatching m : this) {
51  script.addVariable(m.getConcept(), m.getMatching());
52  }
53  return script.evalToDouble(formula, 2);
54  }
55  return 0;
56  }
Here is the call graph for this function:

◆ hasVariable()

boolean org.turro.matching.MatchingSet.hasVariable ( IndicatorVariable  variable)

Definition at line 42 of file MatchingSet.java.

42  {
43  return stream().anyMatch(r -> r.getConcept().equals(variable.getName()));
44  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: