Companion object Field provides utility methods and implicit conversions for the Field type. It also acts as a container for implicit definitions and helpers relating to the Field type.
Attributes
Members list
Type members
Classlikes
Definition of concrete (implicit) type class object for Field being Fuzzy.
Definition of concrete (implicit) type class object for Field being Fuzzy.
Attributes
- Supertypes
- Self type
-
FieldIsFuzzy.type
Value members
Concrete methods
Creates a Field instance based on the provided Value and Factor.
Creates a Field instance based on the provided Value and Factor.
Value parameters
- factor
-
the
Factorto be used in the creation of theField. - value
-
the
Valueto be used in the creation of theField.
Attributes
- Returns
-
a
Fieldinstance constructed from the givenValueandFactor.
Attempt to force the given field to be a Number. Because this may throw an Exception, it is much better to use asNumber, an instance method of Field.
Attempt to force the given field to be a Number. Because this may throw an Exception, it is much better to use asNumber, an instance method of Field.
Value parameters
- field
-
the given field.
Attributes
- Returns
-
a Number if field is a Number, otherwise, this will throw a CoreException.
Implicits
Implicits
Implicit converter from Rational value to a Field value.
Implicit converter from Rational value to a Field value.
Value parameters
- r
-
the Rational value to be converted.
Attributes
- Returns
-
a Field representation of the provided Rational value.