|
|
@ -66,6 +66,10 @@ void matrix_main() {
|
|
|
|
d[0] = cnumber(1, -1);
|
|
|
|
d[0] = cnumber(1, -1);
|
|
|
|
d[1] = 5;
|
|
|
|
d[1] = 5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vector e = vector(2);
|
|
|
|
|
|
|
|
e[0] = cnumber(1, -1);
|
|
|
|
|
|
|
|
e[1] = 5;
|
|
|
|
|
|
|
|
|
|
|
|
matrix m = matrix(2, 2);
|
|
|
|
matrix m = matrix(2, 2);
|
|
|
|
m[0] = a;
|
|
|
|
m[0] = a;
|
|
|
|
m[1] = b;
|
|
|
|
m[1] = b;
|
|
|
@ -92,6 +96,12 @@ void matrix_main() {
|
|
|
|
std::cout << n.get_off_diagonal() << std::endl;
|
|
|
|
std::cout << n.get_off_diagonal() << std::endl;
|
|
|
|
std::cout << "The vector d:" << std::endl;
|
|
|
|
std::cout << "The vector d:" << std::endl;
|
|
|
|
std::cout << 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 << "The matrix n * the vector d" << std::endl;
|
|
|
|
std::cout << n * d << std::endl;
|
|
|
|
std::cout << n * d << std::endl;
|
|
|
|
std::cout << "The vector d * the matrix n" << std::endl;
|
|
|
|
std::cout << "The vector d * the matrix n" << std::endl;
|
|
|
@ -154,9 +164,9 @@ void vector_main() {
|
|
|
|
std::cout << k << std::endl;
|
|
|
|
std::cout << k << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int main() {
|
|
|
|
int main() {
|
|
|
|
fraction_main();
|
|
|
|
//fraction_main();
|
|
|
|
cnumber_main();
|
|
|
|
//cnumber_main();
|
|
|
|
vector_main();
|
|
|
|
//vector_main();
|
|
|
|
matrix_main();
|
|
|
|
matrix_main();
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|