41 typedef S scalar_type;
42 typedef LO local_ordinal_type;
43 typedef GO global_ordinal_type;
44 typedef MV multivector_type;
45 typedef Gen normalgen_type;
46 typedef Teuchos::RCP< Gen > normalgen_ptr;
47 typedef TSQR::Random::MatrixGenerator< S, LO, Gen > matgen_type;
49 typedef typename TSQR::ScalarTraits< S >::magnitude_type magnitude_type;
51 typedef TsqrTypeAdaptor< S, LO, GO, MV > type_adaptor;
52 typedef typename type_adaptor::comm_type comm_type;
53 typedef typename type_adaptor::comm_ptr comm_ptr;
54 typedef Teuchos::RCP< MessengerBase< LO > > ordinal_messenger_ptr;
55 typedef Teuchos::RCP< MessengerBase< S > > scalar_messenger_ptr;
70 const magnitude_type singularValues[])
72 using TSQR::Random::randomGlobalMatrix;
73 using Teuchos::ArrayRCP;
74 typedef MatView< local_ordinal_type, scalar_type > matview_type;
76 local_ordinal_type nrowsLocal, ncols, LDA;
77 fetchDims (A, nrowsLocal, ncols, LDA);
78 ArrayRCP< scalar_type > A_ptr = fetchNonConstView (A);
79 matview_type A_view (nrowsLocal, ncols, A_ptr.get(), LDA);
81 randomGlobalMatrix (pGen_.get(), A_view, singularValues,
82 pOrdinalMessenger_.get(), pScalarMessenger_.get());
95 init (
const multivector_type& mv,
96 const normalgen_ptr& pGen)
100 fetchMessengers (mv, pScalarMessenger_, pOrdinalMessenger_);
120 fetchDims (
const multivector_type& A,
121 local_ordinal_type& nrowsLocal,
122 local_ordinal_type& ncols,
123 local_ordinal_type& LDA)
const = 0;
132 virtual Teuchos::ArrayRCP< scalar_type >
133 fetchNonConstView (multivector_type& A)
const = 0;
138 fetchMessengers (
const multivector_type& mv,
139 scalar_messenger_ptr& pScalarMessenger,
140 ordinal_messenger_ptr& pOrdinalMessenger)
const = 0;
143 ordinal_messenger_ptr pOrdinalMessenger_;
144 scalar_messenger_ptr pScalarMessenger_;