Skip to content

Commit

Permalink
move fcDot to public
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Nov 21, 2023
1 parent dae04b1 commit 3db559e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions OndselSolver/FullColumn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,6 @@ namespace MbD {
template class FullColumn<double>;
template class FullColumn<int>;
template<typename T>
double FullColumn<T>::fcDot(std::shared_ptr<FullVector<T>> vec)
{
int n = (int)this->size();
double answer = 0.0;
for (int i = 0; i < n; i++) {
answer += this->at(i) * vec->at(i);
}
return answer;
}
template<typename T>
std::shared_ptr<FullVector<T>> FullColumn<T>::dot(std::shared_ptr<std::vector<std::shared_ptr<FullColumn<T>>>> vecvec)
{
int ncol = (int)this->size();
Expand Down
11 changes: 11 additions & 0 deletions OndselSolver/FullColumn.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,15 @@ namespace MbD {
{
return std::make_shared<FullColumn<T>>(*this);
}
template<typename T>
double FullColumn<T>::fcDot(std::shared_ptr<FullVector<T>> vec)
{
int n = (int)this->size();
double answer = 0.0;
for (int i = 0; i < n; i++) {
answer += this->at(i) * vec->at(i);
}
return answer;
}

}

0 comments on commit 3db559e

Please sign in to comment.