Package net.ssehub.easy.varModel.model
Class ModelStatistics
java.lang.Object
net.ssehub.easy.varModel.model.ModelStatistics
This class provides some methods to access statistical information about a given project.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classVisits the elements in the given project. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCollects statistics aboutproject.intReturns the number of declared constraints.protected intReturns the number of declared data types.intReturns the number of declared decision variables.
-
Field Details
-
constraintsCount
private int constraintsCount -
variablesCount
private int variablesCount -
declaredDataTypesCount
private int declaredDataTypesCount
-
-
Constructor Details
-
ModelStatistics
public ModelStatistics()Creates a new model statistics object. Please note that we explicitly separated the creation of this object from thecollection of dataas we expect further, more complex statistical operations on subelements (such as the average depth of constraint trees) which shall explicitly be enabled before data collection.
-
-
Method Details
-
collect
Collects statistics aboutproject.- Parameters:
project- the project to collect statistics about
-
getDeclaredConstraintsCount
public int getDeclaredConstraintsCount()Returns the number of declared constraints.- Returns:
- the number of declared constraints
-
getDeclaredVariablesCount
public int getDeclaredVariablesCount()Returns the number of declared decision variables.- Returns:
- the number of declared decision variables
-
getDeclaredDataTypesCount
protected int getDeclaredDataTypesCount()Returns the number of declared data types.- Returns:
- the number of declared data types
-