MyraMath


Source: tests/sparse/Pattern.cpp

1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
11 // Containers.
14 
15 // Reporting.
16 #include <tests/myratest.h>
17 
18 using namespace myra;
19 
20 ADD_TEST("Pattern","[sparse]")
21  {
22  auto A = Pattern::identity(10);
23  myra::out() << "A = " << A << std::endl;
24  }
static Pattern identity(int IJ)
Generates an identity Pattern of specified size.
Definition: Pattern.cpp:289
Definition: syntax.dox:1
Range/Iterator types associated with Pattern.
Container class for a sparse nonzero pattern, used in reordering/symbolic analysis.


Results: [PASS]

A = size 10 by 10 Pattern:
[ x - - - - - - - - - ]
[ - x - - - - - - - - ]
[ - - x - - - - - - - ]
[ - - - x - - - - - - ]
[ - - - - x - - - - - ]
[ - - - - - x - - - - ]
[ - - - - - - x - - - ]
[ - - - - - - - x - - ]
[ - - - - - - - - x - ]
[ - - - - - - - - - x ]


Go back to Summary of /test programs.