Case class to represent the dimensions of a matrix. Currently, area works only for one- or two-dimensional matrices
Value parameters
- xs
-
a sequence of integers defining the numbers of rows, columns, etc.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Ordered[Dimensions]trait Comparable[Dimensions]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Calculates the area of a two-dimensional matrix based on its dimensions. The area is computed as the product of the number of rows and columns. If rows or columns are not defined, default values are used (0 for rows, and 1 for columns).
Calculates the area of a two-dimensional matrix based on its dimensions. The area is computed as the product of the number of rows and columns. If rows or columns are not defined, default values are used (0 for rows, and 1 for columns).
Attributes
- Returns
-
the computed area as an integer value
Result of comparing this with operand that.
Result of comparing this with operand that.
Implement this method to determine how instances of A will be sorted.
Returns x where:
-
x < 0whenthis < that -
x == 0whenthis == that -
x > 0whenthis > that
Value parameters
- that
-
the instance to compare against
Attributes
- Returns
-
an integer whose sign indicates the ordering relation between
thisandthat
Retrieves the number of rows in the collection by inspecting the first element. If the collection is empty, it defaults to 0.
Retrieves the number of rows in the collection by inspecting the first element. If the collection is empty, it defaults to 0.
Attributes
- Returns
-
The number of rows as an integer.
Returns the number of elements in the collection.
Returns the number of elements in the collection.
Attributes
- Returns
-
the size of the collection as an integer
Inherited methods
Returns true if this is less than that
Returns true if this is less than that
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is less than or equal to that.
Returns true if this is less than or equal to that.
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than that.
Returns true if this is greater than that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than or equal to that.
Returns true if this is greater than or equal to that.
Attributes
- Inherited from:
- Ordered
Result of comparing this with operand that.
Result of comparing this with operand that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Concrete fields
Represents the number of columns in the matrix. Defaults to 1 if the matrix has no second dimension.
Represents the number of columns in the matrix. Defaults to 1 if the matrix has no second dimension.