aequilibrae.matrix.AequilibraeMatrix#
- class aequilibrae.matrix.AequilibraeMatrix[source]#
Matrix class
- __init__()[source]#
Creates a memory instance for a matrix, that can be used to load an existing matrix or to create an empty one
Methods
__init__
()Creates a memory instance for a matrix, that can be used to load an existing matrix or to create an empty one
close
()Removes matrix from memory and flushes all data to disk, or closes the OMX file if that is the case
columns
()Returns column vector for the matrix in the computational view
computational_view
([core_list])Creates a memory view for a list of matrices that is compatible with Cython memory buffers
copy
([output_name, cores, names, compress, ...])Copies a list of cores (or all cores) from one matrix file to another one
create_empty
([file_name, zones, ...])Creates an empty matrix in the AequilibraE format
create_from_omx
(file_path, omx_path[, ...])Creates an AequilibraeMatrix from an original OpenMatrix
create_from_trip_list
(path_to_file, ...)Creates an AequilibraeMatrix from a trip list csv file The output is saved in the same folder as the trip list file
export
(output_name[, cores])Exports the matrix to other formats, rather than AEM.
get_matrix
(core[, copy])Returns the data for a matrix core
is_omx
()Returns True if matrix data source is OMX, False otherwise
load
(file_path)Loads matrix from disk.
nan_to_num
()Converts all NaN values in all cores in the computational view to zeros
random_name
()Returns a random name for a matrix with root in the temp directory of the user
rows
()Returns row vector for the matrix in the computational view
save
([names, file_name])Saves matrix data back to file.
setDescription
(matrix_description)Sets description for the matrix
setName
(matrix_name)Sets the name for the matrix itself
set_index
(index_to_set)Sets the standard index to be the one the user wants to have be the one being used in all operations during run time.