@@ -151,5 +151,83 @@ int main()
151151 }
152152 }
153153
154+ {
155+ std::cout << " \n Starting contiguous facets finder run.\n " ;
156+ using ContiguousFacetsFinder =
157+ Sparsepc::linearmodel::ContiguousFacetsFinder<Scalar>;
158+ const auto start = std::chrono::high_resolution_clock::now ();
159+
160+ const ContiguousFacetsFinder::Param param{{k0, k1, k2}};
161+
162+ const auto sparseEigenElements =
163+ ContiguousFacetsFinder{param}.run (sigma);
164+
165+ const auto stop = std::chrono::high_resolution_clock::now ();
166+
167+ const auto durationUs =
168+ std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
169+
170+ std::cout << " \n\n Contiguous facets finder run done in "
171+ << durationUs.count () << " microseconds!\n " ;
172+
173+ for (const auto &component : sparseEigenElements)
174+ {
175+ std::cout << component.value << " :\t "
176+ << component.vector .transpose () << " \n " ;
177+ }
178+ }
179+
180+ {
181+ std::cout << " \n Starting iterative elimination algo. mav run.\n " ;
182+ using MavIterativeElimination =
183+ Sparsepc::linearmodel::MavIterativeElimination<Scalar>;
184+ const auto start = std::chrono::high_resolution_clock::now ();
185+
186+ const MavIterativeElimination::Param param{{k0, k1, k2}};
187+
188+ const auto sparseEigenElements =
189+ MavIterativeElimination{param}.run (sigma);
190+
191+ const auto stop = std::chrono::high_resolution_clock::now ();
192+
193+ const auto durationUs =
194+ std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
195+
196+ std::cout << " \n\n Iterative elimination algo. mav run done in "
197+ << durationUs.count () << " microseconds!\n " ;
198+
199+ for (const auto &component : sparseEigenElements)
200+ {
201+ std::cout << component.value << " :\t "
202+ << component.vector .transpose () << " \n " ;
203+ }
204+ }
205+
206+ {
207+ std::cout << " \n Starting iterative elimination algo. amvl run.\n " ;
208+ using AmvlIterativeElimination =
209+ Sparsepc::linearmodel::AmvlIterativeElimination<Scalar>;
210+ const auto start = std::chrono::high_resolution_clock::now ();
211+
212+ const AmvlIterativeElimination::Param param{{k0, k1, k2}};
213+
214+ const auto sparseEigenElements =
215+ AmvlIterativeElimination{param}.run (sigma);
216+
217+ const auto stop = std::chrono::high_resolution_clock::now ();
218+
219+ const auto durationUs =
220+ std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
221+
222+ std::cout << " \n\n Iterative elimination algo. amvl run done in "
223+ << durationUs.count () << " microseconds!\n " ;
224+
225+ for (const auto &component : sparseEigenElements)
226+ {
227+ std::cout << component.value << " :\t "
228+ << component.vector .transpose () << " \n " ;
229+ }
230+ }
231+
154232 return 0 ;
155233}
0 commit comments