The Wayback Machine - https://web.archive.org/web/20200914225717/https://github.com/mathnet/mathnet-numerics/pull/59
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symmetric matrices #59

Open
wants to merge 33 commits into
base: master
from
Open

Conversation

@alexkaratarakis
Copy link
Contributor

alexkaratarakis commented Nov 26, 2012

Adds symmetric matrices.

-Symmetric class family
SquareMatrix->SymmetricMatrix->SymmetricDenseMatrix

There are some choices that need to be made here:
a) The transpose of a symmetric matrix is the same as the original matrix. This means that Tranpose() can simply return "this". However, this has the pitfall of not being a separate entity and thus changes to the "transposed" affect the original. Since there was a Unit test explicitly checking for NotSameObject, Transpose() return this.clone().

b) Writing the symmetric matrix: [i,j] & [j,i] point to the same element. Modifying the strictly lower triangle is disabled to avoid hard to debug errors. See issue 39 (#39) for more information.

  • Indexer class family
    This uses the recently introduced MatrixStorage. The Storages used for Symmetric Matrices also have an Indexer as a separate class. The same indexer is used for Triangular matrices so its worth having it separately to avoid duplication. Included is a hierarchy to cover Indexers, StaticIndexers, (in contrast to DynamicIndexers used by formats such as Skyline) and PackedStorage with an implemented UpperPackedStorage.
  • Commits
    99b710a [Matrix.Arithmetic] Matrix-Matrix operations that CreateMatrix() request a fullyMutable matrix
    94747be [MatrixTests.Arithmetic] Fix reversed CanKroneckerProduct() test method names

are the only ones (I think) that modify existing files. They are bug fixes that can be independently cherry picked for master.

Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
…est a fullyMutable matrix

Signed-off-by: Alexander Karatarakis <[email protected]>
…te symmetric+non-symmetric into symmetric

Signed-off-by: Alexander Karatarakis <[email protected]>
…r" as SymmetricMatrix

Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
…rix since symm matrices are always square

Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
Signed-off-by: Alexander Karatarakis <[email protected]>
@ghost ghost assigned cdrnet Nov 27, 2012
@cdrnet
Copy link
Member

cdrnet commented Dec 2, 2012

Impressive, thanks!

FYI, currently in mainline in the la-symmetric branch.

@cdrnet cdrnet added this to the Future milestone Apr 12, 2014
@cdrnet cdrnet force-pushed the mathnet:master branch from 7d44c51 to 46454cb Aug 23, 2014
@Fread75
Copy link

Fread75 commented Dec 13, 2019

This feature could be really useful for my use case. Do you still plan to merge it to master ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.