### 4 releases

0.1.3 | Mar 21, 2019 |
---|---|

0.1.2 | Feb 12, 2019 |

0.1.1 | Feb 10, 2019 |

0.1.0 | Jan 22, 2019 |

**31** downloads per month

**MIT**license

9KB

222 lines

# All of this is wildly out of date, needs to be rewritten.

`use` `discrete_transforms ::`

`*`

1D DCT

`let` forward `=` `dct_1d``::`forward`(``&``Vec``<``f64``>``)`
`let` inverse `=` `dct_1d``::`inverse`(``&``Vec``<``f64``>``)`

1D Haar

`let` forward `=` `haar_1d``::`forward`(``&``Vec``<``f64``>``)`
`let` inverse `=` `haar_1d``::`inverse`(``&``Vec``<``f64``>``)`

2D Transforms, create a

object and add in the transform you want`Transform`

`let` dct_forward `=` `Transform``::`new`(`input`,` `TransformType``::`DctForward`)``.``transform``(``)``;`
`let` dct_inverse `=` `Transform``::`new`(`input`,` `TransformType``::`DctInverse`)``.``transform``(``)``;`
`let` haar_forward `=` `Transform``::`new`(`input`,` `TransformType``::`HaarForward`)``.``transform``(``)``;`
`let` haar_inverse `=` `Transform``::`new`(`input`,` `TransformType``::`HaarInverse`)``.``transform``(``)``;`

# Problems / Things that need fixing:

- 2D Transforms only work on 8x8 blocks, block size should be user defined.
- 1D and 2D Haar transforms default to a step size of 3
- This needs to be read and changes made based on it https://rust-lang-nursery.github.io/api-guidelines/about.html
- And many more problems, no doubt...

This is a learning project as much as anything so things will change a lot :-)

#### Dependencies

~371KB