Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Import a sparse matrix from the SuiteSparse matrix collection
ResourceFunction["SuiteSparseMatrix"][spec] imports the specified sparse matrix from the SuiteSparse matrix collection. | |
ResourceFunction["SuiteSparseMatrix"][spec,prop] retrieves the meta information property prop of the specified matrix. | |
ResourceFunction["SuiteSparseMatrix"][cprop] gives the meta information property cprop of the collection. | |
ResourceFunction["SuiteSparseMatrix"][] gives a list {{"name1","group1"},…} for all matrices in the collection. | |
ResourceFunction["SuiteSparseMatrix"][session,…] uses the specified running ExternalSessionObject. |
"name" | matrix name |
{"name","group"} | name and group |
id | integer ID |
"ID" | matrix ID |
"Name" | name |
"Group" | group |
"Kind" | short desription |
{"prop1",…} | list of properties |
"MetaInformation" | available meta information |
All | meta information and the SparseArray value |
All | a catalog of available matrices |
"ContentDate" | release date of the collection |
"ContentLength" | the number of matrices |
"StatisticsURL" | the default URL of the statistics file |
Get a SuiteSparse matrix by name:
In[1]:= | ![]() |
Out[1]= | ![]() |
In[2]:= | ![]() |
Out[2]= | ![]() |
Compute the matrix trace:
In[3]:= | ![]() |
Out[3]= | ![]() |
Import a matrix by its name:
In[4]:= | ![]() |
Out[4]= | ![]() |
By the name and group:
In[5]:= | ![]() |
Out[5]= | ![]() |
By ID:
In[6]:= | ![]() |
Out[6]= | ![]() |
A list of available {"name","group"} pairs:
In[7]:= | ![]() |
Out[7]= | ![]() |
Meta information:
In[8]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
Specified property:
In[10]:= | ![]() |
Out[10]= | ![]() |
Several properties:
In[11]:= | ![]() |
Out[11]= | ![]() |
All available properties:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
Use a specified Python session:
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
Close the session:
In[16]:= | ![]() |
Obtain a graph representation of a large sparse matrix:
In[17]:= | ![]() |
Out[17]= | ![]() |
In[18]:= | ![]() |
Out[18]= | ![]() |
3D visualization:
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
The total number of available sparse matrices currently available in the SuiteSparse matrix collection:
In[21]:= | ![]() |
Out[21]= | ![]() |
The latest update date of the content:
In[22]:= | ![]() |
Out[22]= | ![]() |
A catalog of available matrices:
In[23]:= | ![]() |
Out[24]= | ![]() |
Some of these matrices are also available in ExampleData:
In[25]:= | ![]() |
Out[25]= | ![]() |
The resource function ProbNumObject returns the sparse matrix given its name and group:
In[26]:= | ![]() |
Out[26]= | ![]() |
In[27]:= | ![]() |
Out[27]= | ![]() |
In[28]:= | ![]() |
Out[28]= | ![]() |
Convert to SparseArray:
In[29]:= | ![]() |
Out[29]= | ![]() |
Obtain the same matrix with SuiteSparseMatrix:
In[30]:= | ![]() |
Out[30]= | ![]() |
In[31]:= | ![]() |
Out[31]= | ![]() |
In[32]:= | ![]() |
SuiteSparseMatrix["name"] fails if the same name exists in several groups:
In[33]:= | ![]() |
Out[33]= | ![]() |
Specify the group to retrieve the matrix:
In[34]:= | ![]() |
Out[34]= | ![]() |
Visualize the first few matrices from the SuiteSparse collection:
In[35]:= | ![]() |
Out[35]= | ![]() |
In[36]:= | ![]() |
Out[37]= | ![]() |
In[38]:= | ![]() |
Out[38]= | ![]() |
In[39]:= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License