fuzzy_dl_owl2.fuzzydl.assertion.atomic_assertion
A class representing a fundamental fuzzy logic constraint that links a specific concept to a minimum membership degree threshold.
Description
The software models a basic logical constraint within a fuzzy logic framework by asserting that a specific atomic concept must meet or exceed a defined threshold of membership. It encapsulates a relationship between a concept and a degree, representing the condition where the concept’s membership is greater than or equal to the specified value. By storing these components as instance attributes, the implementation allows for the retrieval of the concept’s identifier and the specific degree value, facilitating the evaluation of logical constraints. The design supports string representation for logging or display purposes, ensuring that the assertion’s state can be easily inspected and communicated within the broader system.
Classes
This class models a fundamental logical constraint within a fuzzy logic framework, specifically asserting that a specific atomic concept must meet or exceed a defined threshold of membership. It encapsulates a relationship between a concept and a degree, representing the condition where the concept's membership is greater than or equal to the specified value. To utilize this class, instantiate it with a Concept object representing the subject and a Degree object representing the required lower bound. The object stores these components and provides methods to retrieve the concept's name and the specific degree value, as well as a string representation of the assertion. |
Module Contents
UML Class Diagram for AtomicAssertion
- class AtomicAssertion(c: fuzzy_dl_owl2.fuzzydl.concept.concept.Concept, degree: fuzzy_dl_owl2.fuzzydl.degree.degree.Degree)[source]
This class models a fundamental logical constraint within a fuzzy logic framework, specifically asserting that a specific atomic concept must meet or exceed a defined threshold of membership. It encapsulates a relationship between a concept and a degree, representing the condition where the concept’s membership is greater than or equal to the specified value. To utilize this class, instantiate it with a Concept object representing the subject and a Degree object representing the required lower bound. The object stores these components and provides methods to retrieve the concept’s name and the specific degree value, as well as a string representation of the assertion.
- Parameters:
- __str__() str[source]
Returns a human-readable string representation of the assertion, formatted with angle brackets that enclose the values of the ‘c’ and ‘degree’ attributes. This method is designed for display and logging purposes, providing a concise snapshot of the object’s current state without causing any side effects.
- Returns:
A string representation of the object, displaying the values of c and degree enclosed in angle brackets.
- Return type:
str
- get_concept_name() str[source]
Retrieves the name of the concept associated with this atomic assertion by accessing the internal attribute c and converting it to a string. This method ensures that the concept identifier is returned as a string, regardless of the original type of the stored attribute. It is a read-only operation that does not modify the state of the object.
- Returns:
The concept name as a string.
- Return type:
str
- get_degree() fuzzy_dl_owl2.fuzzydl.degree.degree.Degree[source]
Retrieves the degree value associated with this atomic assertion. This method acts as a simple accessor for the internal degree attribute, returning the stored instance of the Degree type. As it only reads an existing attribute, the operation has no side effects and does not alter the state of the object.
- Returns:
The degree associated with the object.
- Return type: