Constant#
- class swordfish._swordfishcpp.Constant#
The base class for all Swordfish objects.
All data types (such as
Int,String) and data forms (such asVector,Table) inherit from this class.Provides common operations and properties for all Swordfish data objects.
- property form: DataForm#
Retrieves the data form (DataForm) of a Constant object.
- 返回:
The data form representing the structure of the data (e.g. SCALAR, VECTOR, TABLE).
- 返回类型:
- property type: DataType#
Retrieves the data type (DataType) of a Constant object.
- 返回:
The data type representing the type of the data (e.g., INT, FLOAT, STRING).
- 返回类型:
- is_null()#
Checks if the object is a NULL value or contains NULL elements.
- 返回:
A boolean Constant indicating whether elements are NULL. For scalar input, returns a single boolean value. For non-scalar input, returns a result with the same shape as the input.
- 返回类型:
- rows()#
Returns the number of rows in the object.
- 返回:
The number of rows. For scalar objects, returns 1.
- 返回类型: