Search in sources :

Example 1 with IntegerParameterValue

use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.

the class KatzCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<FloatParameterValue> alphaParameter = FloatParameterType.build(ALPHA_PARAMETER_ID);
    alphaParameter.setName("Alpha");
    alphaParameter.setDescription("The attenuation factor");
    alphaParameter.setFloatValue(0.1F);
    parameters.addParameter(alphaParameter);
    final PluginParameter<FloatParameterValue> betaParameter = FloatParameterType.build(BETA_PARAMETER_ID);
    betaParameter.setName("Beta");
    betaParameter.setDescription("The weight attributed to the immediate neighbourhood");
    betaParameter.setFloatValue(1.0F);
    parameters.addParameter(betaParameter);
    final PluginParameter<IntegerParameterValue> iterationsParameter = IntegerParameterType.build(ITERATIONS_PARAMETER_ID);
    iterationsParameter.setName("Iterations");
    iterationsParameter.setDescription("The number of iterations to run before returning a result");
    iterationsParameter.setIntegerValue(100);
    parameters.addParameter(iterationsParameter);
    final PluginParameter<FloatParameterValue> epsilonParameter = FloatParameterType.build(EPSILON_PARAMETER_ID);
    epsilonParameter.setName("Epsilon");
    epsilonParameter.setDescription("The change threshold at which equilibrium can be considered reached");
    epsilonParameter.setFloatValue(1E-8F);
    parameters.addParameter(epsilonParameter);
    final PluginParameter<BooleanParameterValue> normaliseByPossibleParameter = BooleanParameterType.build(NORMALISE_POSSIBLE_PARAMETER_ID);
    normaliseByPossibleParameter.setName("Normalise By Max Possible Score");
    normaliseByPossibleParameter.setDescription("Normalise calculated scores by the maximum possible score");
    normaliseByPossibleParameter.setBooleanValue(true);
    parameters.addParameter(normaliseByPossibleParameter);
    final PluginParameter<BooleanParameterValue> normaliseByAvailableParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
    normaliseByAvailableParameter.setName("Normalise By Max Available Score");
    normaliseByAvailableParameter.setDescription("Normalise calculated scores by the maximum calculated score");
    normaliseByAvailableParameter.setBooleanValue(false);
    parameters.addParameter(normaliseByAvailableParameter);
    return parameters;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 2 with IntegerParameterValue

use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.

the class EigenvectorCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<IntegerParameterValue> iterationsParameter = IntegerParameterType.build(ITERATIONS_PARAMETER_ID);
    iterationsParameter.setName("Iterations");
    iterationsParameter.setDescription("The number of iterations to run before returning a result");
    iterationsParameter.setIntegerValue(100);
    parameters.addParameter(iterationsParameter);
    final PluginParameter<FloatParameterValue> epsilonParameter = FloatParameterType.build(EPSILON_PARAMETER_ID);
    epsilonParameter.setName("Epsilon");
    epsilonParameter.setDescription("The change threshold at which equilibrium can be considered reached");
    epsilonParameter.setFloatValue(1E-8F);
    parameters.addParameter(epsilonParameter);
    final PluginParameter<BooleanParameterValue> normaliseByPossibleParameter = BooleanParameterType.build(NORMALISE_POSSIBLE_PARAMETER_ID);
    normaliseByPossibleParameter.setName("Normalise By Max Possible Score");
    normaliseByPossibleParameter.setDescription("Normalise calculated scores by the maximum possible score");
    normaliseByPossibleParameter.setBooleanValue(true);
    parameters.addParameter(normaliseByPossibleParameter);
    final PluginParameter<BooleanParameterValue> normaliseByAvailableParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
    normaliseByAvailableParameter.setName("Normalise By Max Available Score");
    normaliseByAvailableParameter.setDescription("Normalise calculated scores by the maximum calculated score");
    normaliseByAvailableParameter.setBooleanValue(false);
    parameters.addParameter(normaliseByAvailableParameter);
    return parameters;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 3 with IntegerParameterValue

use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.

the class HitsCentralityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<IntegerParameterValue> iterationsParameter = IntegerParameterType.build(ITERATIONS_PARAMETER_ID);
    iterationsParameter.setName("Iterations");
    iterationsParameter.setDescription("The number of iterations to run before returning a result");
    iterationsParameter.setIntegerValue(100);
    parameters.addParameter(iterationsParameter);
    final PluginParameter<FloatParameterValue> epsilonParameter = FloatParameterType.build(EPSILON_PARAMETER_ID);
    epsilonParameter.setName("Epsilon");
    epsilonParameter.setDescription("The change threshold at which equilibrium can be considered reached");
    epsilonParameter.setFloatValue(1E-8F);
    parameters.addParameter(epsilonParameter);
    final PluginParameter<BooleanParameterValue> normaliseByAvailableParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
    normaliseByAvailableParameter.setName("Normalise By Max Available Score");
    normaliseByAvailableParameter.setDescription("Normalise calculated scores by the maximum calculated score");
    normaliseByAvailableParameter.setBooleanValue(false);
    parameters.addParameter(normaliseByAvailableParameter);
    return parameters;
}
Also used : FloatParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue) BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 4 with IntegerParameterValue

use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.

the class CosineSimilarityPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<BooleanParameterValue> includeConnectionsInParameter = BooleanParameterType.build(INCLUDE_CONNECTIONS_IN_PARAMETER_ID);
    includeConnectionsInParameter.setName("Include Incoming");
    includeConnectionsInParameter.setDescription("Include incoming connections");
    includeConnectionsInParameter.setBooleanValue(true);
    parameters.addParameter(includeConnectionsInParameter);
    final PluginParameter<BooleanParameterValue> includeConnectionsOutParameter = BooleanParameterType.build(INCLUDE_CONNECTIONS_OUT_PARAMETER_ID);
    includeConnectionsOutParameter.setName("Include Outgoing");
    includeConnectionsOutParameter.setDescription("Include outgoing connections");
    includeConnectionsOutParameter.setBooleanValue(true);
    parameters.addParameter(includeConnectionsOutParameter);
    final PluginParameter<BooleanParameterValue> treatUndirectedBidirectionalParameter = BooleanParameterType.build(TREAT_UNDIRECTED_BIDIRECTIONAL_PARAMETER_ID);
    treatUndirectedBidirectionalParameter.setName("Include Undirected");
    treatUndirectedBidirectionalParameter.setDescription("Treat undirected connections as bidirectional connections");
    treatUndirectedBidirectionalParameter.setBooleanValue(true);
    parameters.addParameter(treatUndirectedBidirectionalParameter);
    final PluginParameter<IntegerParameterValue> minCommonFeatures = IntegerParameterType.build(MINIMUM_COMMON_FEATURES_PARAMETER_ID);
    minCommonFeatures.setName("Minimum Common Features");
    minCommonFeatures.setDescription("Only calculate similarity between nodes that share at least this many features");
    minCommonFeatures.setIntegerValue(3);
    IntegerParameterType.setMinimum(minCommonFeatures, 1);
    parameters.addParameter(minCommonFeatures);
    final PluginParameter<BooleanParameterValue> selectedOnlyParameter = BooleanParameterType.build(SELECTED_ONLY_PARAMETER_ID);
    selectedOnlyParameter.setName("Selected Only");
    selectedOnlyParameter.setDescription("Calculate using only selected elements");
    selectedOnlyParameter.setBooleanValue(false);
    parameters.addParameter(selectedOnlyParameter);
    return parameters;
}
Also used : BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 5 with IntegerParameterValue

use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.

the class JaccardIndexPlugin method createParameters.

@Override
public PluginParameters createParameters() {
    final PluginParameters parameters = new PluginParameters();
    final PluginParameter<BooleanParameterValue> includeConnectionsInParameter = BooleanParameterType.build(INCLUDE_CONNECTIONS_IN_PARAMETER_ID);
    includeConnectionsInParameter.setName("Include Incoming");
    includeConnectionsInParameter.setDescription("Include incoming connections");
    includeConnectionsInParameter.setBooleanValue(true);
    parameters.addParameter(includeConnectionsInParameter);
    final PluginParameter<BooleanParameterValue> includeConnectionsOutParameter = BooleanParameterType.build(INCLUDE_CONNECTIONS_OUT_PARAMETER_ID);
    includeConnectionsOutParameter.setName("Include Outgoing");
    includeConnectionsOutParameter.setDescription("Include outgoing connections");
    includeConnectionsOutParameter.setBooleanValue(true);
    parameters.addParameter(includeConnectionsOutParameter);
    final PluginParameter<BooleanParameterValue> treatUndirectedBidirectionalParameter = BooleanParameterType.build(TREAT_UNDIRECTED_BIDIRECTIONAL_PARAMETER_ID);
    treatUndirectedBidirectionalParameter.setName("Include Undirected");
    treatUndirectedBidirectionalParameter.setDescription("Treat undirected connections as bidirectional connections");
    treatUndirectedBidirectionalParameter.setBooleanValue(true);
    parameters.addParameter(treatUndirectedBidirectionalParameter);
    final PluginParameter<IntegerParameterValue> minCommonFeatures = IntegerParameterType.build(MINIMUM_COMMON_FEATURES_PARAMETER_ID);
    minCommonFeatures.setName("Minimum Common Features");
    minCommonFeatures.setDescription("Only calculate similarity between nodes that share at least this many features");
    minCommonFeatures.setIntegerValue(3);
    IntegerParameterType.setMinimum(minCommonFeatures, 1);
    parameters.addParameter(minCommonFeatures);
    final PluginParameter<BooleanParameterValue> selectedOnlyParameter = BooleanParameterType.build(SELECTED_ONLY_PARAMETER_ID);
    selectedOnlyParameter.setName("Selected Only");
    selectedOnlyParameter.setDescription("Calculate using only selected elements");
    selectedOnlyParameter.setBooleanValue(false);
    parameters.addParameter(selectedOnlyParameter);
    return parameters;
}
Also used : BooleanParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue) IntegerParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Aggregations

IntegerParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue)51 PluginParameters (au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)44 BooleanParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue)27 SingleChoiceParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.SingleChoiceParameterType.SingleChoiceParameterValue)13 PluginParameter (au.gov.asd.tac.constellation.plugins.parameters.PluginParameter)11 FloatParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue)8 ArrayList (java.util.ArrayList)8 Test (org.testng.annotations.Test)8 MultiChoiceParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.MultiChoiceParameterType.MultiChoiceParameterValue)5 ObjectParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.ObjectParameterType.ObjectParameterValue)5 ParameterChange (au.gov.asd.tac.constellation.plugins.parameters.ParameterChange)4 Map (java.util.Map)4 StringParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue)3 LinkedHashMap (java.util.LinkedHashMap)3 ColorParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.ColorParameterType.ColorParameterValue)2 LocalDateParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.LocalDateParameterType.LocalDateParameterValue)2 GraphElementType (au.gov.asd.tac.constellation.graph.GraphElementType)1 SchemaTransactionType (au.gov.asd.tac.constellation.graph.schema.type.SchemaTransactionType)1 SchemaVertexType (au.gov.asd.tac.constellation.graph.schema.type.SchemaVertexType)1 PluginParametersPane (au.gov.asd.tac.constellation.plugins.gui.PluginParametersPane)1