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
29# elif defined(__IBMCPP__)
33# define TRILINOS_UNUSED_FUNCTION
35# define 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);
Defines basic traits for the scalar field type.
Definition of Teuchos::as, for conversions between types.
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.
AdderType::index_type index_type
The type of indices of the sparse graph.
Teuchos::RCP< AdderType > getAdder() const
Persisting non-const view of the underlying adder object.
Smart reference counting pointer class for automatic garbage collection.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...