Reflected changes to README

This commit is contained in:
Leto 2024-12-24 14:33:22 +01:00
parent 3c596e9601
commit 57fa219441
2 changed files with 13 additions and 25 deletions

View File

@ -24,7 +24,7 @@ LeMA will eventually be used for graphical and machine learning usage in my othe
#include "matrices.h"
```
That's it! You're ready to use Lema.
That's it! You're ready to use LeMA.
### Example Usage
@ -45,18 +45,15 @@ int main() {
```cpp
#include "matrices.h"
#include <iostream>
int main() {
Matrix a(2,2);
Matrix b(2,2);
a.Set(2.0F); // Fill A with 2s
Matrix b = a;
Matrix result = a + &b; // Basic operations are possible with pointers
a.Set(2.0F); // Fill both matrices
b.Set(3.0F);
a.Add(&b);
a.Print("A + B");
result.Print("A + B"); // Is full of 4s !
return 0;
}
```
@ -65,15 +62,14 @@ int main() {
```cpp
#include "matrices.h"
#include <iostream>
int main() {
Matrix a(3, 3);
Matrix b(3, 1); // Let's multiply by a vector
Matrix result = a.Multiply(&b);
Matrix result = a * &b;
result.Print("A x B");
result.Print("A x B"); // Result is a 3 by 1 vector
return 0;
}

View File

@ -1,20 +1,12 @@
#include "matrices.h"
// using namespace std;
int main()
{
srand(time(0));
Matrix a(3,3);
a.Randomize();
Matrix b(3, 1);
b.Set(2.0F);
a.Print("A");
b.Print("B");
int main() {
Matrix a(3, 3);
Matrix b(3, 1); // Let's multiply by a vector
Matrix result = a * &b;
result.Print("A x B");
result.Print("A x B"); // Result is a 3 by 1 vector
return 0;
}