Some more examples

main
Micke Nordin 2 years ago
parent 24e8b2bcc1
commit d00653b964
Signed by: micke
GPG Key ID: 014B273D614BE877

@ -66,6 +66,10 @@ void matrix_main() {
d[0] = cnumber(1, -1);
d[1] = 5;
vector e = vector(2);
e[0] = cnumber(1, -1);
e[1] = 5;
matrix m = matrix(2, 2);
m[0] = a;
m[1] = b;
@ -92,6 +96,12 @@ void matrix_main() {
std::cout << n.get_off_diagonal() << std::endl;
std::cout << "The vector d:" << std::endl;
std::cout << d << std::endl;
std::cout << "Matrix n augmented by the vector e" << std::endl;
matrix yahoo = n.augment(e);
std::cout << yahoo << std::endl;
std::cout << "The vector d as row:" << std::endl;
d.make_row();
std::cout << d << std::endl;
std::cout << "The matrix n * the vector d" << std::endl;
std::cout << n * d << std::endl;
std::cout << "The vector d * the matrix n" << std::endl;
@ -154,9 +164,9 @@ void vector_main() {
std::cout << k << std::endl;
}
int main() {
fraction_main();
cnumber_main();
vector_main();
//fraction_main();
//cnumber_main();
//vector_main();
matrix_main();
return 0;
}

Loading…
Cancel
Save