Class AbstractBooleanFunctionProblem<G>

java.lang.Object
com.knezevic.edaf.v3.problems.crypto.AbstractBooleanFunctionProblem<G>
All Implemented Interfaces:
Problem<G>
Direct Known Subclasses:
BooleanFunctionMultiObjectiveProblem, BooleanFunctionPermutationProblem, BooleanFunctionProblem, BooleanFunctionTreeProblem

public abstract class AbstractBooleanFunctionProblem<G> extends Object implements Problem<G>
Shared base for cryptographic boolean-function optimization problems.
  • Field Details

    • n

      protected final int n
    • truthTableSize

      protected final int truthTableSize
    • criteria

      protected final List<CryptoFitnessCriterion> criteria
    • criterionIds

      protected final List<String> criterionIds
    • criterionWeights

      protected final double[] criterionWeights
    • criterionWeightSum

      protected final double criterionWeightSum
  • Constructor Details

    • AbstractBooleanFunctionProblem

      protected AbstractBooleanFunctionProblem(int n, List<String> criterionIds, Map<String,Double> criterionWeights)
  • Method Details

    • objectiveSense

      public ObjectiveSense objectiveSense()
      Description copied from interface: Problem
      Returns whether this problem is min or max.
      Specified by:
      objectiveSense in interface Problem<G>
    • evaluateScalarFitness

      protected final ScalarFitness evaluateScalarFitness(int[] truthTable)
    • evaluateVectorFitness

      protected final VectorFitness evaluateVectorFitness(int[] truthTable, double[] scalarWeights)
    • objectiveValues

      protected final double[] objectiveValues(BooleanFunctionStats stats)
    • toTruthTableFromBits

      protected final int[] toTruthTableFromBits(boolean[] bits)
    • toTruthTableFromBalancedPermutation

      protected final int[] toTruthTableFromBalancedPermutation(int[] permutation)
    • objectiveCount

      public int objectiveCount()
      Description copied from interface: Problem
      Number of objectives; defaults to one objective.
      Specified by:
      objectiveCount in interface Problem<G>
    • variableCount

      public int variableCount()
    • truthTableSize

      public int truthTableSize()
    • criterionIds

      public List<String> criterionIds()
    • evaluate

      public abstract Fitness evaluate(G genotype)
      Description copied from interface: Problem
      Evaluates one genotype and returns its fitness.
      Specified by:
      evaluate in interface Problem<G>