{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/comments/78759111","id":78759111,"diff_hunk":"@@ -0,0 +1,64 @@\n+export QuasiNewtonModel, LBFGSModel, LSR1Model,\n+       reset!,\n+       obj, grad, grad!,\n+       cons, cons!, jac_coord, jac, jprod, jprod!, jtprod, jtprod!,\n+       hprod, hess_op,\n+       push!\n+\n+abstract QuasiNewtonModel <: AbstractNLPModel\n+\n+type LBFGSModel <: QuasiNewtonModel\n+  meta :: NLPModelMeta\n+  model :: AbstractNLPModel\n+  op :: LBFGSOperator\n+end\n+\n+type LSR1Model <: QuasiNewtonModel\n+  meta :: NLPModelMeta\n+  model :: AbstractNLPModel\n+  op :: LSR1Operator\n+end\n+\n+\"Construct a `LBFGSModel` from another type of model.\"\n+function LBFGSModel(nlp :: AbstractNLPModel; memory :: Int=5)\n+  op = LBFGSOperator(nlp.meta.nvar, memory)\n+  return LBFGSModel(nlp.meta, nlp, op)\n+end\n+\n+\"Construct a `LSR1Model` from another type of nlp.\"\n+function LSR1Model(nlp :: AbstractNLPModel; memory :: Int=5)\n+  op = LSR1Operator(nlp.meta.nvar, memory)\n+  return LSR1Model(nlp.meta, nlp, op)\n+end\n+\n+# retrieve counters from underlying model\n+for counter in fieldnames(Counters)\n+  @eval begin\n+    $counter(nlp :: QuasiNewtonModel) = $counter(nlp.model)\n+    export $counter\n+  end\n+end\n+\n+function reset!(nlp :: QuasiNewtonModel)\n+  reset!(nlp.model.counters)\n+  reset!(nlp.op)","path":"src/qn_model.jl","position":44,"original_position":44,"commit_id":"0c565f37d64efffd54afabf3a1fb1503a9779233","original_commit_id":"789de4863fdb794addf42db0cdbd88d7e0ec3644","user":{"login":"dpo","id":38760,"avatar_url":"https://avatars.githubusercontent.com/u/38760?v=3","gravatar_id":"","url":"https://api.github.com/users/dpo","html_url":"https://github.com/dpo","followers_url":"https://api.github.com/users/dpo/followers","following_url":"https://api.github.com/users/dpo/following{/other_user}","gists_url":"https://api.github.com/users/dpo/gists{/gist_id}","starred_url":"https://api.github.com/users/dpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpo/subscriptions","organizations_url":"https://api.github.com/users/dpo/orgs","repos_url":"https://api.github.com/users/dpo/repos","events_url":"https://api.github.com/users/dpo/events{/privacy}","received_events_url":"https://api.github.com/users/dpo/received_events","type":"User","site_admin":false},"body":"Right so we need a new release of LinearOperators. Do you see anything else you'd like to get in there very soon?","created_at":"2016-09-14T14:26:35Z","updated_at":"2016-09-14T14:26:35Z","html_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28#discussion_r78759111","pull_request_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/comments/78759111"},"html":{"href":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28#discussion_r78759111"},"pull_request":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28","id":84795903,"html_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28","diff_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28.diff","patch_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28.patch","issue_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/28","number":28,"state":"open","locked":false,"title":"Quasi-Newton Models","user":{"login":"dpo","id":38760,"avatar_url":"https://avatars.githubusercontent.com/u/38760?v=3","gravatar_id":"","url":"https://api.github.com/users/dpo","html_url":"https://github.com/dpo","followers_url":"https://api.github.com/users/dpo/followers","following_url":"https://api.github.com/users/dpo/following{/other_user}","gists_url":"https://api.github.com/users/dpo/gists{/gist_id}","starred_url":"https://api.github.com/users/dpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpo/subscriptions","organizations_url":"https://api.github.com/users/dpo/orgs","repos_url":"https://api.github.com/users/dpo/repos","events_url":"https://api.github.com/users/dpo/events{/privacy}","received_events_url":"https://api.github.com/users/dpo/received_events","type":"User","site_admin":false},"body":"A simple initial design for quasi-Newton models. Example\r\n```julia\r\njulia> using NLPModels\r\njulia> model = SimpleNLPModel(x -> dot(x, x), zeros(2))\r\njulia> qnmodel = LBFGSModel(model)  # or LSR1Model; optional memory argument\r\n```\r\nDifferences with other types of models:\r\n* `hess_coord()` is not implemented (the Hessian is typically dense)\r\n* `hess()` ~~returns a `LinearOperator`~~ is not implemented\r\n* `hprod()` applies the linear operator\r\n\r\nI'll add tests when we agree on the design.\r\n\r\n@abelsiqueira \r\n","created_at":"2016-09-11T19:46:43Z","updated_at":"2016-09-14T14:26:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"827ab6b17e074a9673583c8935a5461caa6ff3f4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28/commits","review_comments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28/comments","review_comment_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/28/comments","statuses_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/statuses/0c565f37d64efffd54afabf3a1fb1503a9779233","head":{"label":"JuliaSmoothOptimizers:qnmodels","ref":"qnmodels","sha":"0c565f37d64efffd54afabf3a1fb1503a9779233","user":{"login":"JuliaSmoothOptimizers","id":15710294,"avatar_url":"https://avatars.githubusercontent.com/u/15710294?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSmoothOptimizers","html_url":"https://github.com/JuliaSmoothOptimizers","followers_url":"https://api.github.com/users/JuliaSmoothOptimizers/followers","following_url":"https://api.github.com/users/JuliaSmoothOptimizers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSmoothOptimizers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSmoothOptimizers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSmoothOptimizers/subscriptions","organizations_url":"https://api.github.com/users/JuliaSmoothOptimizers/orgs","repos_url":"https://api.github.com/users/JuliaSmoothOptimizers/repos","events_url":"https://api.github.com/users/JuliaSmoothOptimizers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSmoothOptimizers/received_events","type":"Organization","site_admin":false},"repo":{"id":40225581,"name":"NLPModels.jl","full_name":"JuliaSmoothOptimizers/NLPModels.jl","owner":{"login":"JuliaSmoothOptimizers","id":15710294,"avatar_url":"https://avatars.githubusercontent.com/u/15710294?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSmoothOptimizers","html_url":"https://github.com/JuliaSmoothOptimizers","followers_url":"https://api.github.com/users/JuliaSmoothOptimizers/followers","following_url":"https://api.github.com/users/JuliaSmoothOptimizers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSmoothOptimizers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSmoothOptimizers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSmoothOptimizers/subscriptions","organizations_url":"https://api.github.com/users/JuliaSmoothOptimizers/orgs","repos_url":"https://api.github.com/users/JuliaSmoothOptimizers/repos","events_url":"https://api.github.com/users/JuliaSmoothOptimizers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSmoothOptimizers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl","description":"Data Structures for Optimization Models","fork":false,"url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl","forks_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/forks","keys_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/teams","hooks_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/events","assignees_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/tags","blobs_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/subscription","commits_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/merges","archive_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/downloads","issues_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/deployments","created_at":"2015-08-05T05:06:28Z","updated_at":"2016-05-11T21:18:49Z","pushed_at":"2016-09-14T03:47:32Z","git_url":"git://github.com/JuliaSmoothOptimizers/NLPModels.jl.git","ssh_url":"git@github.com:JuliaSmoothOptimizers/NLPModels.jl.git","clone_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl.git","svn_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl","homepage":"","size":204,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaSmoothOptimizers:develop","ref":"develop","sha":"938182946723e2038fdfd0338e005f1c5c2d757d","user":{"login":"JuliaSmoothOptimizers","id":15710294,"avatar_url":"https://avatars.githubusercontent.com/u/15710294?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSmoothOptimizers","html_url":"https://github.com/JuliaSmoothOptimizers","followers_url":"https://api.github.com/users/JuliaSmoothOptimizers/followers","following_url":"https://api.github.com/users/JuliaSmoothOptimizers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSmoothOptimizers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSmoothOptimizers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSmoothOptimizers/subscriptions","organizations_url":"https://api.github.com/users/JuliaSmoothOptimizers/orgs","repos_url":"https://api.github.com/users/JuliaSmoothOptimizers/repos","events_url":"https://api.github.com/users/JuliaSmoothOptimizers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSmoothOptimizers/received_events","type":"Organization","site_admin":false},"repo":{"id":40225581,"name":"NLPModels.jl","full_name":"JuliaSmoothOptimizers/NLPModels.jl","owner":{"login":"JuliaSmoothOptimizers","id":15710294,"avatar_url":"https://avatars.githubusercontent.com/u/15710294?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSmoothOptimizers","html_url":"https://github.com/JuliaSmoothOptimizers","followers_url":"https://api.github.com/users/JuliaSmoothOptimizers/followers","following_url":"https://api.github.com/users/JuliaSmoothOptimizers/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSmoothOptimizers/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSmoothOptimizers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSmoothOptimizers/subscriptions","organizations_url":"https://api.github.com/users/JuliaSmoothOptimizers/orgs","repos_url":"https://api.github.com/users/JuliaSmoothOptimizers/repos","events_url":"https://api.github.com/users/JuliaSmoothOptimizers/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSmoothOptimizers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl","description":"Data Structures for Optimization Models","fork":false,"url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl","forks_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/forks","keys_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/teams","hooks_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/events","assignees_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/tags","blobs_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/subscription","commits_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/merges","archive_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/downloads","issues_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/deployments","created_at":"2015-08-05T05:06:28Z","updated_at":"2016-05-11T21:18:49Z","pushed_at":"2016-09-14T03:47:32Z","git_url":"git://github.com/JuliaSmoothOptimizers/NLPModels.jl.git","ssh_url":"git@github.com:JuliaSmoothOptimizers/NLPModels.jl.git","clone_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl.git","svn_url":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl","homepage":"","size":204,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28"},"html":{"href":"https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/28"},"issue":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/28"},"comments":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaSmoothOptimizers/NLPModels.jl/statuses/0c565f37d64efffd54afabf3a1fb1503a9779233"}}}}
{"actor":{"display_login":"dpo"}}