GF2::Matrix — Descriptive Material
Dump some descriptive data about a bit-matrix to a stream.
constexpr void description(std::ostream &s, +
const std::string &head = "", +
const std::string &foot = "\n") const; (1)
constexpr void description(const std::string &head = "", +
const std::string &foot = "\n") const; (2)
| 1 | Prints data to an arbitrary stream. |
| 2 | Prints the same data to std::cout. |
You can send along some arbitrary text that get prepended or appended to the description of the bit-matrix. See the example below.
|
These methods are primarily used for debugging purposes. The format of the descriptive data may change from time to time. |
Example
#include <GF2/GF2.h>
int main()
{
auto m = GF2::Matrix<>::random(6);
m.description("Random fill using a fair coin");
}
Output
Random fill using a fair coin: (1)
Matrix dimension: 6 x 6
Matrix capacity: 6 x 64
Number of set elements: 23
111010 = 0x71_4
011011 = 0x63_4
100011 = 0x13_4
010111 = 0xA3_4
110011 = 0x33_4
001111 = 0xC3_4
| 1 | The optional user supplied header line. |
See Also