Public Member Functions | List of all members
mirtk::EdgeConnectivity Class Reference

#include <EdgeConnectivity.h>

Inheritance diagram for mirtk::EdgeConnectivity:
Inheritance graph
Collaboration diagram for mirtk::EdgeConnectivity:
Collaboration graph

Public Member Functions

virtual void Clear ()
 Clear edge-connectivity table.
 
 EdgeConnectivity (vtkDataSet *=nullptr, int n=3, const EdgeTable *=nullptr)
 Construct edge-connectivity table for given dataset.
 
 EdgeConnectivity (vtkDataSet *, double r, const EdgeTable *=nullptr)
 Construct edge-connectivity table for given dataset.
 
 EdgeConnectivity (const EdgeConnectivity &)
 Copy constructor.
 
void GetAdjacentPoints (int, int &, const int *&) const
 Access list of adjacent (i.e. 1-connected) nodes (thread-safe)
 
void GetAdjacentPoints (int, const int *&, const int *&) const
 Get start and end pointer into list of adjacent (i.e. 1-connected) nodes (thread-safe)
 
void GetConnectedPoints (int, int &, const int *&, int n=-1) const
 Access list of nodes with edge-connectivity less or equal to n (thread-safe)
 
void GetConnectedPoints (int, const int *&, const int *&, int n=-1) const
 
void Initialize (vtkDataSet *, int n=3, const EdgeTable *=nullptr)
 Initialize edge-connectivity table from given dataset.
 
void Initialize (vtkDataSet *, double r, const EdgeTable *=nullptr)
 Initialize edge-connectivity table from given dataset.
 
int NumberOfAdjacentPoints (int) const
 Get number of adjacent nodes, i.e., nodes with edge-connectivity equal one.
 
int NumberOfConnectedPoints (int, int n=-1) const
 Get number of nodes with edge-connectivity less or equal to n.
 
int NumberOfPoints () const
 Number of nodes.
 
EdgeConnectivityoperator= (const EdgeConnectivity &)
 Assignment operator.
 
virtual ~EdgeConnectivity ()
 Destructor.
 
- Public Member Functions inherited from mirtk::GenericSparseMatrix< int >
void ClearIndex ()
 Free memory needed for precomputed indices.
 
void Col (int, Entries &, bool=false)
 
Entries Col (int) const
 
int ColNNZ (int) const
 Number of non-zero entries in specified column.
 
EntryType ColSum (int) const
 
void Column (int, Entries &, bool=false)
 
Entries Column (int) const
 
EntryType ColumnSum (int) const
 
Vector Diag () const
 Get diagonal values.
 
void Diag (const Vector &d)
 Set diagonal to specified (non-zero) values.
 
void Diag (int d)
 Set diagonal to specified (non-zero) value.
 
int Eigenvalues (Vector &v, int k, const char *sigma="LM", int p=0, double tol=.0, int maxit=0, Vector *v0=NULL) const
 
int Eigenvectors (Matrix &E, int k, const char *sigma="LM", int p=0, double tol=.0, int maxit=0, Vector *v0=NULL) const
 
int Eigenvectors (Matrix &E, Vector &v, int k, const char *sigma="LM", int p=0, double tol=.0, int maxit=0, Vector *v0=NULL) const
 
 GenericSparseMatrix (StorageLayout=CCS)
 Default constructor.
 
 GenericSparseMatrix (int, int=0, StorageLayout=CCS)
 Construct sparse m x n matrix.
 
 GenericSparseMatrix (int, int, int, StorageLayout=CCS)
 Construct sparse m x n matrix with specified number of non-zero entries.
 
 GenericSparseMatrix (const GenericSparseMatrix< TOtherEntry > &)
 Copy constructor.
 
EntryType Get (int, int=-1) const
 Get value.
 
void GetCol (int, Entries &) const
 
void GetColumn (int, Entries &) const
 
void GetDiag (Vector &d) const
 Get diagonal values.
 
int GetRawData (int *&, int *&, int *&) const
 Get raw access to index and data arrays.
 
void GetRow (int, Entries &) const
 
void Index ()
 
void Initialize (int, int=0, int=0)
 Initialize sparse matrix.
 
void Initialize (int, int, Array< Entries > &, bool=false)
 Initialize sparse matrix given compressed rows (CRS) or columns (CCS)
 
void Initialize (int, int, Entries [], bool=false)
 Initialize sparse matrix given compressed rows (CRS) or columns (CCS)
 
bool IsSymmetric () const
 Whether this matrix is symmetric.
 
void Layout (StorageLayout)
 Change storage layout.
 
void MakeSymmetric (bool extent=false)
 
 mirtkAttributeMacro (int, Size)
 Number of allocated elements.
 
 mirtkPublicAttributeMacro (int, MaxNumberOfUnusedEntries)
 Maximum number of unused entries, i.e., (_Size - _NNZ)
 
 mirtkReadOnlyAttributeMacro (enum StorageLayout, Layout)
 Storage layout.
 
 mirtkReadOnlyAttributeMacro (int, Rows)
 Number of rows.
 
 mirtkReadOnlyAttributeMacro (int, Cols)
 Number of columns.
 
 mirtkReadOnlyAttributeMacro (int, NNZ)
 Number of non-zero entries.
 
void MultAv (EntryType [], EntryType []) const
 
EntryTypeoperator() (int, int=-1)
 
GenericSparseMatrix operator* (EntryType) const
 Multiply by a scalar.
 
GenericSparseMatrixoperator*= (EntryType)
 Multiply by a scalar in-place.
 
GenericSparseMatrix operator/ (EntryType) const
 Divide by a scalar.
 
GenericSparseMatrixoperator/= (EntryType)
 Divide by a scalar in-place.
 
GenericSparseMatrixoperator= (const GenericSparseMatrix< TOtherEntry > &)
 Assignment operator.
 
void Put (int, int, EntryType)
 
int * RawPointer (int=0)
 Get raw access to non-zero values.
 
const int * RawPointer (int=0) const
 Get raw access to non-zero values.
 
bool ReadMAT (const char *, const char *="A")
 
void RemoveZeros ()
 Remove any zero entries.
 
void Reserve (int)
 Reserve more memory.
 
void Row (int, Entries &, bool=false)
 
Entries Row (int) const
 
int RowNNZ (int) const
 Number of non-zero entries in specified row.
 
EntryType RowSum (int) const
 
GenericSparseMatrixScaleCol (int, EntryType)
 
GenericSparseMatrixScaleColumn (int, EntryType)
 
GenericSparseMatrixScaleRow (int, EntryType)
 
GenericSparseMatrix Sub (int, int, int, int) const
 Get non-zero entries of specified submatrix.
 
void Sub (int, int, const GenericSparseMatrix &)
 Set non-zero entries of specified submatrix.
 
int SubNNZ (int, int, int, int) const
 Number of non-zero entries in specified submatrix.
 
void Transpose (bool keep_layout=false)
 
bool WriteMAT (const char *, const char *="A") const
 
void WriteMFile (const char *, const char *="A") const
 
void Zero ()
 Set all non-zero entries to zero (i.e., remove)
 
virtual ~GenericSparseMatrix ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from mirtk::GenericSparseMatrix< int >
typedef Array< EntryEntries
 List of non-zero entries.
 
typedef Pair< int, int > Entry
 Type of non-zero entry.
 
typedef int EntryType
 Type of matrix entry values.
 
enum  StorageLayout
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Protected Member Functions inherited from mirtk::GenericSparseMatrix< int >
void CheckEntries (Entries &) const
 Check non-zero entries, sort them, remove zero entries, and sum up duplicates.
 
void CopyAttributes (const GenericSparseMatrix< TOtherEntry > &)
 Copy other matrix, used by copy constructor and assignment operator only.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 
- Protected Attributes inherited from mirtk::GenericSparseMatrix< int >
int * _Col
 
EntryType_Data
 Non-zero entries.
 
Array< int > * _Index
 
int * _Row
 

Detailed Description

Table of edge-connectivities / n-connected neighbors

The entries of this sparse matrix represent the minimum number of edges that connect two given nodes. Unlike an EdgeTable, which stores a unique ID for each edge connecting adjacent nodes (1-connected), this table can be used to store a larger neighborhood of not only adjacent nodes. It can, however, not be used to iterate the edges/paths in a certain order. An irtkNeighborsTable is instead used to simply iterate over the n-connected neighbors of a given node, e.g., to compute the irtkMetricDistortion.

Alternatively, this table can be used to query the edge-connectivity for every pair of mesh nodes. If two nodes are not connected,

the edge-connectivity is zero.

Definition at line 51 of file EdgeConnectivity.h.

Member Function Documentation

§ GetConnectedPoints()

void mirtk::EdgeConnectivity::GetConnectedPoints ( int  ptId,
const int *&  begin,
const int *&  end,
int  n = -1 
) const
inline

Get start and end pointer into list of nodes with edge-connectivity less or equal to n (thread-safe)

Definition at line 152 of file EdgeConnectivity.h.


The documentation for this class was generated from the following file: