Skip to content

Commit a41776f

Browse files
committed
revision class state
1 parent 6fad31d commit a41776f

File tree

7 files changed

+135
-117
lines changed

7 files changed

+135
-117
lines changed

src/conncomp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ConnComp::ConnComp( const SparseMatrix<int, ColMajor> &BB)
4444

4545

4646

47-
VectorXi ConnComp::head(const int n) const
47+
VectorXi ConnComp::head( const Index n) const
4848
{
4949
assert( n>=0 );
5050
if ( n==0) {
@@ -53,7 +53,7 @@ VectorXi ConnComp::head(const int n) const
5353
return m_comp.head(n);
5454
}
5555

56-
VectorXi ConnComp::tail( const int n) const
56+
VectorXi ConnComp::tail( const Index n) const
5757
{
5858
assert( n>=0 );
5959
if ( n==0) {

src/conncomp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class ConnComp
4242
[[nodiscard]] VectorXi mapHead( int cc, Index n) const; //!< Get linear indices of the elements in 1...n with label 'cc'.
4343
[[nodiscard]] VectorXi mapTail(int cc, Index n) const; //!< Get linear indices of the elements in n-1...end with label 'cc'.
4444
[[nodiscard]] int label( Index i) const; //!< Get label/index of i-th element
45-
[[nodiscard]] VectorXi head( int n) const; //!< Get labels/indices of first n elements
46-
[[nodiscard]] VectorXi tail( int n) const; //!< Get labels/indices of last n elements
45+
[[nodiscard]] VectorXi head( Index n) const; //!< Get labels/indices of first n elements
46+
[[nodiscard]] VectorXi tail( Index n) const; //!< Get labels/indices of last n elements
4747

4848
//! Get number of connected components
4949
[[nodiscard]] int number() const { return m_comp.size()>0 ? m_comp.maxCoeff()+1 : 0; }

src/greasepad.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
1919

2020

2121
# set assember's flags (MinGW), syntax: -Wa,<comma-separated list>
22-
QMAKE_CXXFLAGS += -Wa,-mbig-obj
22+
# QMAKE_CXXFLAGS += -Wa,-mbig-obj
2323

2424

2525
SOURCES += \

src/matrix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ SparseMatrix<int> IncidenceMatrix::biadjacency() const {
6666
}
6767

6868

69-
VectorXi IncidenceMatrix::findInColumn( const int c ) const
69+
VectorXi IncidenceMatrix::findInColumn( const Index c ) const
7070
{
7171
Eigen::Index const nnz = innerVector(c).nonZeros();
7272

@@ -81,7 +81,7 @@ VectorXi IncidenceMatrix::findInColumn( const int c ) const
8181

8282

8383

84-
void IncidenceMatrix::remove_column( const int c) {
84+
void IncidenceMatrix::remove_column( const Index c) {
8585

8686
// qDebug() << Q_FUNC_INFO;
8787

@@ -100,7 +100,7 @@ void IncidenceMatrix::remove_column( const int c) {
100100
*this = (*this)*TT;
101101
}
102102

103-
void IncidenceMatrix::remove_row(const int r)
103+
void IncidenceMatrix::remove_row( const Index r)
104104
{
105105
// qDebug() << QString("remove row #%1").arg(r);
106106

@@ -122,7 +122,7 @@ void IncidenceMatrix::remove_row(const int r)
122122

123123

124124
// remove i-th column and i-th row.....................................
125-
void IncidenceMatrix::reduce(const int i)
125+
void IncidenceMatrix::reduce( const Index i)
126126
{
127127
// qDebug() << QString("reduce %1").arg(i);
128128

src/matrix.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ class IncidenceMatrix : public SparseMatrix<int, ColMajor, int>
4141
return *this;
4242
}
4343

44-
[[nodiscard]] VectorXi findInColumn( int c ) const; //!< Matlab: find(A(:,c))
44+
[[nodiscard]] VectorXi findInColumn( Index c ) const; //!< Matlab: find(A(:,c))
4545
[[nodiscard]] bool isSet( Index r, Index c) const; //!< Check if r and c are related
4646
[[nodiscard]] SparseMatrix<int> biadjacency() const; //!< Create biadjacency matrix [O, A; A', O]
4747

4848
void set( Index r, Index c) { coeffRef(r,c) = 1; } //!< Set relation (row r, column c)
4949
void unset( Index r, Index c) { coeffRef(r,c) = 0; } //!< Delete relation (row r, column c)
5050

51-
void remove_row( int r ); //!< Remove r-th row
52-
void remove_column( int c ); //!< Remove c-th column
53-
void reduce( int i); //!< Remove i-th column and i-th row
51+
void remove_row( Index r ); //!< Remove r-th row
52+
void remove_column( Index c ); //!< Remove c-th column
53+
void reduce( Index i); //!< Remove i-th column and i-th row
5454

5555
//! Augment matrix by one row and one column
5656
void augment() { conservativeResize( rows()+1, cols()+1); }

0 commit comments

Comments
 (0)