00001 /* @HEADER@ */ 00002 // 00003 /* @HEADER@ */ 00004 00005 00006 #ifndef RANDOMSPARSEMATRIX_BUILDER_DECL_HPP 00007 #define RANDOMSPARSEMATRIX_BUILDER_DECL_HPP 00008 00009 #include "PlayaOperatorBuilder.hpp" 00010 00011 00012 using namespace Playa; 00013 using namespace Teuchos; 00014 00015 00016 namespace Playa 00017 { 00019 template <class Scalar> 00020 class RandomSparseMatrixBuilder : public OperatorBuilder<Scalar> 00021 { 00022 public: 00024 RandomSparseMatrixBuilder(int nLocalRows, int nLocalCols, 00025 double onProcDensity, 00026 double offProcDensity, 00027 const VectorType<double>& vecType); 00029 RandomSparseMatrixBuilder(const VectorSpace<Scalar>& domain, 00030 const VectorSpace<Scalar>& range, 00031 double onProcDensity, 00032 double offProcDensity, 00033 const VectorType<double>& vecType); 00034 00036 LinearOperator<double> getOp() const {return op_;} 00037 00038 private: 00039 00040 void initOp(double onProcDensity, 00041 double offProcDensity); 00042 00043 LinearOperator<double> op_; 00044 }; 00045 00046 } 00047 00048 #endif