73 typedef S scalar_type;
74 typedef LO local_ordinal_type;
75 typedef GO global_ordinal_type;
76 typedef MV multivector_type;
77 typedef Gen normalgen_type;
78 typedef Teuchos::RCP< Gen > normalgen_ptr;
79 typedef TSQR::Random::MatrixGenerator< S, LO, Gen > matgen_type;
81 typedef typename TSQR::ScalarTraits< S >::magnitude_type magnitude_type;
83 typedef TsqrTypeAdaptor< S, LO, GO, MV > type_adaptor;
84 typedef typename type_adaptor::comm_type comm_type;
85 typedef typename type_adaptor::comm_ptr comm_ptr;
86 typedef Teuchos::RCP< MessengerBase< LO > > ordinal_messenger_ptr;
87 typedef Teuchos::RCP< MessengerBase< S > > scalar_messenger_ptr;
102 const magnitude_type singularValues[])
104 using TSQR::Random::randomGlobalMatrix;
105 using Teuchos::ArrayRCP;
106 typedef MatView< local_ordinal_type, scalar_type > matview_type;
108 local_ordinal_type nrowsLocal, ncols, LDA;
109 fetchDims (A, nrowsLocal, ncols, LDA);
110 ArrayRCP< scalar_type > A_ptr = fetchNonConstView (A);
111 matview_type A_view (nrowsLocal, ncols, A_ptr.get(), LDA);
113 randomGlobalMatrix (pGen_.get(), A_view, singularValues,
114 pOrdinalMessenger_.get(), pScalarMessenger_.get());
127 init (
const multivector_type& mv,
128 const normalgen_ptr& pGen)
132 fetchMessengers (mv, pScalarMessenger_, pOrdinalMessenger_);
152 fetchDims (
const multivector_type& A,
153 local_ordinal_type& nrowsLocal,
154 local_ordinal_type& ncols,
155 local_ordinal_type& LDA)
const = 0;
164 virtual Teuchos::ArrayRCP< scalar_type >
165 fetchNonConstView (multivector_type& A)
const = 0;
170 fetchMessengers (
const multivector_type& mv,
171 scalar_messenger_ptr& pScalarMessenger,
172 ordinal_messenger_ptr& pOrdinalMessenger)
const = 0;
175 ordinal_messenger_ptr pOrdinalMessenger_;
176 scalar_messenger_ptr pScalarMessenger_;