genericROM.BasicAlgorithms.Metrics
- L2Dissimilarity(snapshots, massMatrix=None, faster=True, verbose=False)[source]
Constructs the L2 dissimilarity matrix of a set of snapshots
- Parameters
snapshots (np.ndarray) – of size (numberOfSnapshots, numberOfDofs)
- Returns
of size (numberOfSnapshots, numberOfSnapshots)
- Return type
np.ndarray
- Norm(snapshots, massMatrix=None)[source]
Constructs the norm vector of a set of snapshots
- Parameters
snapshots (np.ndarray) – of size (numberOfSnapshots, numberOfDofs)
- Returns
of size (numberOfSnapshots)
- Return type
np.ndarray
- ScalarProductXX(snapshots, massMatrix=None, verbose=False)[source]
Constructs the scalar product matrix of two sets of snapshots
- Parameters
snapshots (np.ndarray) – of size (numberOfSnapshots, numberOfDofs)
massMatrix (None or scipy.sparse.csr) – the sparse matrix of the L2 scalar product, of size (numberOfDofs, numberOfDofs)
- Returns
of size (numberOfSnapshots1, numberOfSnapshots2)
- Return type
np.ndarray
- ScalarProductXY(snapshots1, snapshots2, massMatrix=None)[source]
Constructs the scalar product matrix of two sets of snapshots
- Parameters
snapshots1 (np.ndarray) – of size (numberOfSnapshots1, numberOfDofs)
snapshots2 (np.ndarray) – of size (numberOfSnapshots2, numberOfDofs)
massMatrix (None or scipy.sparse.csr) – the sparse matrix of the L2 scalar product, of size (numberOfDofs, numberOfDofs)
- Returns
of size (numberOfSnapshots1, numberOfSnapshots2)
- Return type
np.ndarray