Class AlgorithmParametersReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.links.recommendation.algorithms.AlgorithmParametersReader
public class AlgorithmParametersReader extends ParametersReader
Class for reading contact recommendation / link prediction algorithms.
 For each algorithm, it reads a single configuration
 
File format:
algorithms:
algorithm_name:
param1: ...
File format:
algorithms:
algorithm_name:
param1: ...
- See Also:
- ParametersReader
- 
Field SummaryFields Modifier and Type Field Description private static java.lang.StringALGORITHMSprivate java.util.Map<java.lang.String,Parameters>algorithmsGridAlgorithms grid.
- 
Constructor SummaryConstructors Constructor Description AlgorithmParametersReader()Constructor.
- 
Method SummaryModifier and Type Method Description java.util.Set<java.lang.String>getAlgorithms()Gets the set of algorithms previously read.ParametersgetParameters(java.lang.String algorithm)Gets the grid for a given algorithmvoidread(java.util.Map<java.lang.String,java.lang.Object> map)Obtains the algorithm grids for different people-to-people recommendation algorithms.private voidreadAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the grid for a single algorithm.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReaderreadBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
- 
Field Details- 
ALGORITHMSprivate static final java.lang.String ALGORITHMS- See Also:
- Constant Field Values
 
- 
algorithmsGridAlgorithms grid. Uses a grid for each algorithm.
 
- 
- 
Constructor Details- 
AlgorithmParametersReaderpublic AlgorithmParametersReader()Constructor.
 
- 
- 
Method Details- 
readpublic void read(java.util.Map<java.lang.String,java.lang.Object> map)Obtains the algorithm grids for different people-to-people recommendation algorithms.- Parameters:
- map- the object containing the grids for the people-to-people recommendation algorithms.
 
- 
readAlgorithmprivate void readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the grid for a single algorithm.- Parameters:
- element- a map containing the information in the YAML file about the algorithm.
 
- 
getAlgorithmspublic java.util.Set<java.lang.String> getAlgorithms()Gets the set of algorithms previously read.- Returns:
- The set of algorithms previously read from the grid file.
 
- 
getParametersGets the grid for a given algorithm- Parameters:
- algorithm- the algorithm to search
- Returns:
- the grid if exists, an empty grid if not.
 
 
-