10 #ifndef __Teuchos_MatrixMarket_SymmetrizingGraphAdder_hpp
11 #define __Teuchos_MatrixMarket_SymmetrizingGraphAdder_hpp
20 #if ! defined(TRILINOS_UNUSED_FUNCTION)
21 # if defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
22 # define TRILINOS_UNUSED_FUNCTION __attribute__((__unused__))
23 # elif defined(__clang__)
24 # if __has_attribute(unused)
25 # define TRILINOS_UNUSED_FUNCTION __attribute__((__unused__))
27 # define TRILINOS_UNUSED_FUNCTION
28 # endif // Clang has 'unused' attribute
29 # elif defined(__IBMCPP__)
33 # define TRILINOS_UNUSED_FUNCTION
34 # else // some other compiler
35 # define TRILINOS_UNUSED_FUNCTION
37 #endif // ! defined(TRILINOS_UNUSED_FUNCTION)
41 namespace MatrixMarket {
62 template<
class AdderType>
75 const std::string& symmType) :
77 symmetrize_ (needsSymmetrization (symmType)),
78 skew_ (isSkew (symmType))
86 AdderType& theAdder = *adder_;
89 if (symmetrize_ && i != j) {
98 theAdder (j, i,
false);
121 #endif // __Teuchos_MatrixMarket_SymmetrizingGraphAdder_hpp
AdderType::index_type index_type
The type of indices of the sparse graph.
void operator()(const index_type i, const index_type j)
Add entry (i,j), and optionally symmetrize.
SymmetrizingGraphAdder(const Teuchos::RCP< AdderType > &adder, const std::string &symmType)
Constructor.
Teuchos::RCP< AdderType > getAdder() const
Persisting non-const view of the underlying adder object.
Defines basic traits for the scalar field type.
Definition of Teuchos::as, for conversions between types.
Adds entries with optional symmetry to a sparse graph.