Package net.ssehub.easy.varModel.model
Class ModelStatistics
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelStatistics
-
public class ModelStatistics extends java.lang.ObjectThis class provides some methods to access statistical information about a given project.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classModelStatistics.StatisticsVisitorVisits the elements in the given project.
-
Field Summary
Fields Modifier and Type Field Description private intconstraintsCountprivate intdeclaredDataTypesCountprivate intvariablesCount
-
Constructor Summary
Constructors Constructor Description ModelStatistics()Creates a new model statistics object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(Project project)Collects statistics aboutproject.intgetDeclaredConstraintsCount()Returns the number of declared constraints.protected intgetDeclaredDataTypesCount()Returns the number of declared data types.intgetDeclaredVariablesCount()Returns the number of declared decision variables.
-
-
-
Constructor Detail
-
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 Detail
-
collect
public void collect(Project project)
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
-
-