This class represents the reshaping of an expression. The operator vectorizes the expression, then unvectorizes it into the new dimensions. Entries are stored in column-major order.
Reshape(expr, new_dim)
# S4 method for class 'Reshape'
to_numeric(object, values)
# S4 method for class 'Reshape'
validate_args(object)
# S4 method for class 'Reshape'
dim_from_args(object)
# S4 method for class 'Reshape'
is_atom_log_log_convex(object)
# S4 method for class 'Reshape'
is_atom_log_log_concave(object)
# S4 method for class 'Reshape'
get_data(object)
# S4 method for class 'Reshape'
graph_implementation(object, arg_objs, dim, data = NA_real_)
An Expression or numeric matrix.
The new dimensions.
A Reshape object.
A list of arguments to the atom.
A list of linear expressions for each argument.
A vector representing the dimensions of the resulting expression.
A list of additional data required by the atom.
to_numeric(Reshape)
: Reshape the value into the specified dimensions.
validate_args(Reshape)
: Check the new shape has the same number of entries as the old.
dim_from_args(Reshape)
: The c(rows, cols)
dimensions of the new expression.
is_atom_log_log_convex(Reshape)
: Is the atom log-log convex?
is_atom_log_log_concave(Reshape)
: Is the atom log-log concave?
get_data(Reshape)
: Returns a list containing the new shape.
graph_implementation(Reshape)
: The graph implementation of the atom.
expr
An Expression or numeric matrix.
new_dim
The new dimensions.