-
GILLES Sebastien authoredGILLES Sebastien authored
GlobalMatrix.cpp 1.09 KiB
//
// GlobalMatrix.cpp
// HappyHeart
//
// Created by Sebastien Gilles on 27/04/15.
// Copyright (c) 2015 Inria. All rights reserved.
//
#include "Core/LinearAlgebra/GlobalMatrix.hpp"
#include "Core/NumberingSubset.hpp"
namespace HappyHeart
{
GlobalMatrix::GlobalMatrix(const NumberingSubset& row_numbering_subset,
const NumberingSubset& col_numbering_subset)
: row_numbering_subset_(row_numbering_subset),
col_numbering_subset_(col_numbering_subset)
{ }
GlobalMatrix::GlobalMatrix(const GlobalMatrix& rhs)
: Parent(rhs),
row_numbering_subset_(rhs.row_numbering_subset_),
col_numbering_subset_(rhs.col_numbering_subset_)
{ }
void Swap(GlobalMatrix& A, GlobalMatrix& B)
{
assert(A.GetColNumberingSubset() == B.GetColNumberingSubset());
assert(A.GetRowNumberingSubset() == B.GetRowNumberingSubset());
using Parent = GlobalMatrix::Parent;
Swap(static_cast<Parent&>(A), static_cast<Parent&>(B));
}
} // namespace HappyHeart