From 97ef5d7ba6c4391f859e711f6a9bf09066c416ee Mon Sep 17 00:00:00 2001
From: Dmitrij Naumov <dmitrij@naumov.de>
Date: Fri, 26 Jul 2013 22:39:43 +0200
Subject: [PATCH] Add GlobalDenseMatrix::addSubMatrix for same columns as row
 positions.

---
 MathLib/LinAlg/Dense/GlobalDenseMatrix.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/MathLib/LinAlg/Dense/GlobalDenseMatrix.h b/MathLib/LinAlg/Dense/GlobalDenseMatrix.h
index ddf1939c87c..0c9bc24f243 100644
--- a/MathLib/LinAlg/Dense/GlobalDenseMatrix.h
+++ b/MathLib/LinAlg/Dense/GlobalDenseMatrix.h
@@ -70,6 +70,16 @@ public:
 	virtual bool addValue(IDX_TYPE row, IDX_TYPE col, FP_TYPE val);
 
 
+	/// Add sub-matrix at positions \c row_pos and same column positions as the
+	/// given row positions.
+	template<class T_DENSE_MATRIX>
+	void addSubMatrix(std::vector<IDX_TYPE> const& row_pos,
+			const T_DENSE_MATRIX &sub_matrix,
+			FP_TYPE fkt = static_cast<FP_TYPE>(1.0))
+	{
+		this->addSubMatrix(row_pos, row_pos, sub_matrix, fkt);
+	}
+
 	template<class T_DENSE_MATRIX>
 	void addSubMatrix(std::vector<IDX_TYPE> const& row_pos,
 			std::vector<IDX_TYPE> const& col_pos, const T_DENSE_MATRIX &sub_matrix,
-- 
GitLab