-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Zippers for updating matrix factorizations #55
Comments
Linked SO comment on zippers for editing trees: Oftentimes there's a tight correspondence between Monad structure and this kind of tree grafting. Here's an example
Where (>>=) is doing nothing more than leaf extension (tree grafting) based on some function f :: a -> Tree a. Then we can easily conduct the grafting you're looking for
But that's terrifically inefficient since it'll visit every Leaf in your tree searching for the specific one you'd like to replace. We can do better if we know more information. If the tree is somehow ordered and sorted then you can use fingertree or splaytree to conduct an efficient replacement. If we know the node we'd like to replace by its path alone we can use a Zipper.
Which lets us step in and out of the root of a Tree
and once we're inside, walk in whatever direction we like
And edit leaves
Or perhaps all of the leaves below a certain location using our bind from above!
And then we can walk down to any point in the tree before doing our graft
|
Zipper for updating a tree :
https://stackoverflow.com/questions/19552214/rewriting-trees-in-haskell
Symbolic part of a sparse Cholesky factorization employs elimination tree:
https://en.wikipedia.org/wiki/Symbolic_Cholesky_decomposition
Note:
The text was updated successfully, but these errors were encountered: