-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update LUD methods * Clang format updates * updates
- Loading branch information
1 parent
4ee4945
commit 26f1afe
Showing
3 changed files
with
62 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* @file result_types.hpp | ||
* | ||
*/ | ||
|
||
#ifndef MARSVIN_LU_DECOMPOSITION_RESULT_TYPES_HPP_ | ||
#define MARSVIN_LU_DECOMPOSITION_RESULT_TYPES_HPP_ | ||
|
||
namespace marsvin { | ||
namespace lud { | ||
|
||
template<typename T> | ||
class result { | ||
public: | ||
result(::marsvin::Matrix<T> L, | ||
::marsvin::Matrix<T> U, | ||
::marsvin::Matrix<T> P, | ||
::marsvin::Matrix<T> Q) { | ||
result_.reserve(4); | ||
result_.push_back(std::move(L)); | ||
result_.push_back(std::move(U)); | ||
result_.push_back(std::move(P)); | ||
result_.push_back(std::move(Q)); | ||
} | ||
const ::marsvin::Matrix<T>& L() { | ||
return result_.at(0); | ||
}; | ||
::marsvin::Matrix<T> U() { | ||
return result_.at(1); | ||
} | ||
::marsvin::Matrix<T> P() { | ||
return result_.at(2); | ||
} | ||
::marsvin::Matrix<T> Q() { | ||
return result_.at(3); | ||
} | ||
|
||
private: | ||
std::vector<::marsvin::Matrix<T>> result_; | ||
}; | ||
|
||
} // namespace lud | ||
} // namespace marsvin | ||
|
||
#endif // MARSVIN_LU_DECOMPOSITION_RESULT_TYPES_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters