{"action":"created","comment":{"url":"https://api.github.com/repos/odlgroup/odl/pulls/comments/69862917","id":69862917,"diff_hunk":"@@ -0,0 +1,168 @@\n+# Copyright 2014-2016 The ODL development group\n+#\n+# This file is part of ODL.\n+#\n+# ODL is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# ODL is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with ODL.  If not, see <http://www.gnu.org/licenses/>.\n+\n+\"\"\" Implementation of the forward-backward primal-dual splitting algorithm for\n+optimization.\n+\"\"\"\n+\n+\n+# Imports for common Python 2/3 codebase\n+from __future__ import print_function, division, absolute_import\n+from future import standard_library\n+standard_library.install_aliases()\n+\n+from odl.operator import Operator\n+\n+\n+__all__ = ('forward_backward_pd',)\n+\n+\n+def forward_backward_pd(x, prox_f, prox_cc_g, L, grad_h, tau, sigma, niter,\n+                        callback=None, **kwargs):\n+    \"\"\" The forward-backward primal-dual splitting algorithm.\n+\n+    The algorithm minimizes the sum of several convex functionals composed with\n+    linear operators,\n+\n+        ``min_x f(x) + sum_i g_i(L_i x) + h(x)``,\n+\n+    where ``f``, ``g_i`` are convex functionals, ``L_i`` are linear\n+    `Operator`'s, and ``h`` is a convex and differentiable functional.\n+\n+    The method can also be used to solve the more general problem\n+\n+        ``min_x f(x) + sum_i (g_i @ l_i)(L_i x)``,\n+\n+    where ``l_i`` are convex functionals and @ is the infimal convolution:\n+\n+        ``(f @ g)(x) = inf_y { f(x-y) + g(y) }``\n+\n+    Parameters\n+    ----------\n+    x : `LinearSpaceVector`\n+        Initial point, updated in place.\n+    prox_f : `callable`\n+        `Proximal factory` for the functional ``f``.\n+    prox_cc_g : `sequence` of `callable`'s\n+        Sequence of `proximal factories` for the convex conjuates of the\n+        functionals ``g_i``.\n+    grad_h : `Operator`\n+        Operators representing the gradient of  `h`.\n+    L : `sequence` of `Operator`'s\n+        A sequence with as many elements as ``prox__cc_gs`` of operators\n+        ``L_i``\n+    tau : `float`\n+        Step size-like parameter for ``prox_f``\n+    sigma : `sequence` of  `float`\n+        Sequence of step size-like parameter for the sequence ``prox_cc_g``","path":"odl/solvers/advanced/forward_backward.py","position":71,"original_position":71,"commit_id":"2e4ad3913933e8921e26c9a0ceaafbc4b9000ba9","original_commit_id":"2e4ad3913933e8921e26c9a0ceaafbc4b9000ba9","user":{"login":"kohr-h","id":5030250,"avatar_url":"https://avatars.githubusercontent.com/u/5030250?v=3","gravatar_id":"","url":"https://api.github.com/users/kohr-h","html_url":"https://github.com/kohr-h","followers_url":"https://api.github.com/users/kohr-h/followers","following_url":"https://api.github.com/users/kohr-h/following{/other_user}","gists_url":"https://api.github.com/users/kohr-h/gists{/gist_id}","starred_url":"https://api.github.com/users/kohr-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohr-h/subscriptions","organizations_url":"https://api.github.com/users/kohr-h/orgs","repos_url":"https://api.github.com/users/kohr-h/repos","events_url":"https://api.github.com/users/kohr-h/events{/privacy}","received_events_url":"https://api.github.com/users/kohr-h/received_events","type":"User","site_admin":false},"body":"Good formulation btw, very clear","created_at":"2016-07-07T07:37:47Z","updated_at":"2016-07-07T07:37:47Z","html_url":"https://github.com/odlgroup/odl/pull/480#discussion_r69862917","pull_request_url":"https://api.github.com/repos/odlgroup/odl/pulls/480","_links":{"self":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/comments/69862917"},"html":{"href":"https://github.com/odlgroup/odl/pull/480#discussion_r69862917"},"pull_request":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/480"}}},"pull_request":{"url":"https://api.github.com/repos/odlgroup/odl/pulls/480","id":76295704,"html_url":"https://github.com/odlgroup/odl/pull/480","diff_url":"https://github.com/odlgroup/odl/pull/480.diff","patch_url":"https://github.com/odlgroup/odl/pull/480.patch","issue_url":"https://api.github.com/repos/odlgroup/odl/issues/480","number":480,"state":"open","locked":false,"title":"Forward backward primal dual","user":{"login":"aringh","id":15774494,"avatar_url":"https://avatars.githubusercontent.com/u/15774494?v=3","gravatar_id":"","url":"https://api.github.com/users/aringh","html_url":"https://github.com/aringh","followers_url":"https://api.github.com/users/aringh/followers","following_url":"https://api.github.com/users/aringh/following{/other_user}","gists_url":"https://api.github.com/users/aringh/gists{/gist_id}","starred_url":"https://api.github.com/users/aringh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aringh/subscriptions","organizations_url":"https://api.github.com/users/aringh/orgs","repos_url":"https://api.github.com/users/aringh/repos","events_url":"https://api.github.com/users/aringh/events{/privacy}","received_events_url":"https://api.github.com/users/aringh/received_events","type":"User","site_admin":false},"body":"Adds the forward-backward primal-dual solver. Reference article is found [here](http://www.mat.univie.ac.at/~rabot/publications/jour15-01.pdf) (algorithm is found in Theorem 2).","created_at":"2016-07-05T15:37:53Z","updated_at":"2016-07-07T07:37:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3468b44d9325cbee72873143cc27a1de816a3cc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/odlgroup/odl/pulls/480/commits","review_comments_url":"https://api.github.com/repos/odlgroup/odl/pulls/480/comments","review_comment_url":"https://api.github.com/repos/odlgroup/odl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odlgroup/odl/issues/480/comments","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/2e4ad3913933e8921e26c9a0ceaafbc4b9000ba9","head":{"label":"odlgroup:forward_backward_primal_dual","ref":"forward_backward_primal_dual","sha":"2e4ad3913933e8921e26c9a0ceaafbc4b9000ba9","user":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45596393,"name":"odl","full_name":"odlgroup/odl","owner":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odlgroup/odl","description":"Operator Discretization Library","fork":false,"url":"https://api.github.com/repos/odlgroup/odl","forks_url":"https://api.github.com/repos/odlgroup/odl/forks","keys_url":"https://api.github.com/repos/odlgroup/odl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odlgroup/odl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odlgroup/odl/teams","hooks_url":"https://api.github.com/repos/odlgroup/odl/hooks","issue_events_url":"https://api.github.com/repos/odlgroup/odl/issues/events{/number}","events_url":"https://api.github.com/repos/odlgroup/odl/events","assignees_url":"https://api.github.com/repos/odlgroup/odl/assignees{/user}","branches_url":"https://api.github.com/repos/odlgroup/odl/branches{/branch}","tags_url":"https://api.github.com/repos/odlgroup/odl/tags","blobs_url":"https://api.github.com/repos/odlgroup/odl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odlgroup/odl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odlgroup/odl/git/refs{/sha}","trees_url":"https://api.github.com/repos/odlgroup/odl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/{sha}","languages_url":"https://api.github.com/repos/odlgroup/odl/languages","stargazers_url":"https://api.github.com/repos/odlgroup/odl/stargazers","contributors_url":"https://api.github.com/repos/odlgroup/odl/contributors","subscribers_url":"https://api.github.com/repos/odlgroup/odl/subscribers","subscription_url":"https://api.github.com/repos/odlgroup/odl/subscription","commits_url":"https://api.github.com/repos/odlgroup/odl/commits{/sha}","git_commits_url":"https://api.github.com/repos/odlgroup/odl/git/commits{/sha}","comments_url":"https://api.github.com/repos/odlgroup/odl/comments{/number}","issue_comment_url":"https://api.github.com/repos/odlgroup/odl/issues/comments{/number}","contents_url":"https://api.github.com/repos/odlgroup/odl/contents/{+path}","compare_url":"https://api.github.com/repos/odlgroup/odl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odlgroup/odl/merges","archive_url":"https://api.github.com/repos/odlgroup/odl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odlgroup/odl/downloads","issues_url":"https://api.github.com/repos/odlgroup/odl/issues{/number}","pulls_url":"https://api.github.com/repos/odlgroup/odl/pulls{/number}","milestones_url":"https://api.github.com/repos/odlgroup/odl/milestones{/number}","notifications_url":"https://api.github.com/repos/odlgroup/odl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odlgroup/odl/labels{/name}","releases_url":"https://api.github.com/repos/odlgroup/odl/releases{/id}","deployments_url":"https://api.github.com/repos/odlgroup/odl/deployments","created_at":"2015-11-05T07:57:55Z","updated_at":"2016-06-16T12:20:53Z","pushed_at":"2016-07-07T06:54:53Z","git_url":"git://github.com/odlgroup/odl.git","ssh_url":"git@github.com:odlgroup/odl.git","clone_url":"https://github.com/odlgroup/odl.git","svn_url":"https://github.com/odlgroup/odl","homepage":null,"size":18717,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":119,"forks":6,"open_issues":119,"watchers":8,"default_branch":"master"}},"base":{"label":"odlgroup:master","ref":"master","sha":"665ab5e27e91c67c3bf1b5042e18477809138c1c","user":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45596393,"name":"odl","full_name":"odlgroup/odl","owner":{"login":"odlgroup","id":15667171,"avatar_url":"https://avatars.githubusercontent.com/u/15667171?v=3","gravatar_id":"","url":"https://api.github.com/users/odlgroup","html_url":"https://github.com/odlgroup","followers_url":"https://api.github.com/users/odlgroup/followers","following_url":"https://api.github.com/users/odlgroup/following{/other_user}","gists_url":"https://api.github.com/users/odlgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/odlgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odlgroup/subscriptions","organizations_url":"https://api.github.com/users/odlgroup/orgs","repos_url":"https://api.github.com/users/odlgroup/repos","events_url":"https://api.github.com/users/odlgroup/events{/privacy}","received_events_url":"https://api.github.com/users/odlgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odlgroup/odl","description":"Operator Discretization Library","fork":false,"url":"https://api.github.com/repos/odlgroup/odl","forks_url":"https://api.github.com/repos/odlgroup/odl/forks","keys_url":"https://api.github.com/repos/odlgroup/odl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odlgroup/odl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odlgroup/odl/teams","hooks_url":"https://api.github.com/repos/odlgroup/odl/hooks","issue_events_url":"https://api.github.com/repos/odlgroup/odl/issues/events{/number}","events_url":"https://api.github.com/repos/odlgroup/odl/events","assignees_url":"https://api.github.com/repos/odlgroup/odl/assignees{/user}","branches_url":"https://api.github.com/repos/odlgroup/odl/branches{/branch}","tags_url":"https://api.github.com/repos/odlgroup/odl/tags","blobs_url":"https://api.github.com/repos/odlgroup/odl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odlgroup/odl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odlgroup/odl/git/refs{/sha}","trees_url":"https://api.github.com/repos/odlgroup/odl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odlgroup/odl/statuses/{sha}","languages_url":"https://api.github.com/repos/odlgroup/odl/languages","stargazers_url":"https://api.github.com/repos/odlgroup/odl/stargazers","contributors_url":"https://api.github.com/repos/odlgroup/odl/contributors","subscribers_url":"https://api.github.com/repos/odlgroup/odl/subscribers","subscription_url":"https://api.github.com/repos/odlgroup/odl/subscription","commits_url":"https://api.github.com/repos/odlgroup/odl/commits{/sha}","git_commits_url":"https://api.github.com/repos/odlgroup/odl/git/commits{/sha}","comments_url":"https://api.github.com/repos/odlgroup/odl/comments{/number}","issue_comment_url":"https://api.github.com/repos/odlgroup/odl/issues/comments{/number}","contents_url":"https://api.github.com/repos/odlgroup/odl/contents/{+path}","compare_url":"https://api.github.com/repos/odlgroup/odl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odlgroup/odl/merges","archive_url":"https://api.github.com/repos/odlgroup/odl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odlgroup/odl/downloads","issues_url":"https://api.github.com/repos/odlgroup/odl/issues{/number}","pulls_url":"https://api.github.com/repos/odlgroup/odl/pulls{/number}","milestones_url":"https://api.github.com/repos/odlgroup/odl/milestones{/number}","notifications_url":"https://api.github.com/repos/odlgroup/odl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odlgroup/odl/labels{/name}","releases_url":"https://api.github.com/repos/odlgroup/odl/releases{/id}","deployments_url":"https://api.github.com/repos/odlgroup/odl/deployments","created_at":"2015-11-05T07:57:55Z","updated_at":"2016-06-16T12:20:53Z","pushed_at":"2016-07-07T06:54:53Z","git_url":"git://github.com/odlgroup/odl.git","ssh_url":"git@github.com:odlgroup/odl.git","clone_url":"https://github.com/odlgroup/odl.git","svn_url":"https://github.com/odlgroup/odl","homepage":null,"size":18717,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":119,"forks":6,"open_issues":119,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/480"},"html":{"href":"https://github.com/odlgroup/odl/pull/480"},"issue":{"href":"https://api.github.com/repos/odlgroup/odl/issues/480"},"comments":{"href":"https://api.github.com/repos/odlgroup/odl/issues/480/comments"},"review_comments":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/480/comments"},"review_comment":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odlgroup/odl/pulls/480/commits"},"statuses":{"href":"https://api.github.com/repos/odlgroup/odl/statuses/2e4ad3913933e8921e26c9a0ceaafbc4b9000ba9"}}}}
{"actor":{"display_login":"kohr-h"}}