Metadata-Version: 2.1
Name: matvec
Version: 0.0.7
Summary: Fast matrix transforms
Home-page: https://github.com/maniospas/matvec
Author: Emmanouil (Manios) Krasanakis
Author-email: maniospas@hotmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# matvec

A domain-specific language for fast graph shift operations.
This implements mathematical fields on numbers,
n-dimensional column vectors, and n-by-n sparse matrices.

**License:** Apache Software License
<br>**Author:** Emmanouil (Manios) Krasanakis
<br>**Dependncies:** ---

# :zap: Quickstart
Creating a 5-dimensional vector:
```python
from matvec import Vector
x = Vector([1, 2, 3, 4, 5])
```

Creating a 5x5 sparse matrix A in coo-format 
with non-zero elements A[1,2]=9 and A[3,0]=21
```python
from matvec import Matrix
A = Matrix([1, 2],
           [3, 0],
           [9, 21],
           5)
```

Print the outcome of matrix-vector multiplication:
```python
print(A*x)
```

Print the outcome of left-multiplying transpose(x)
with A:
```python
print(x*A)
```

# :fire: Features
:rocket: Parallelized matrix-vector multiplication.<br>
:chart_with_downwards_trend: Memory reuse optimization.<br>
:mag: numpy compatibility.<br>
:factory: Common arithmetic operations.<br>

# :volcano: Benchmark
Current benchmark values are exhibited only on *one machine*.
More rigorous evaluation will take place in the future.

| Task                                   | numpy/scipy | matvec    |
|----------------------------------------|-------------|-----------|
| Allocate vectors with 2E6 elements     | 0.101 sec   | 0.106 sec |
| 1000 temp. additions with 2E6 elements | 4.067 sec   | 2.265 sec |
| Allocate matrix with 2E6 non-zeros     | 0.231 sec   | 0.073 sec |
| Sparse matrix with vec multiplication  | 0.024 sec   | 0.012 sec |


