Git Product home page Git Product logo

Comments (5)

lostella avatar lostella commented on August 17, 2024

I actually put directly the first two in a more optimized way...

What do you mean by "vector form"? You mean getting Array arguments rather than Hermitian or Symmetric ones?

from proximaloperators.jl.

mfalt avatar mfalt commented on August 17, 2024

The variables in MathProgBase corresponding to a SDP cone are represented in a single vector according to loadproblem! in the link in my original post. So to go from the vector to a Symmetric one would do something like

# Converts a vector representation of a symmetrix matrix.
# The off diagonal elements are assumed to be scaled by a factor of sqrt(2) in the input.
function vec2symmetric(x::AbstractVector)
  y = length(x)
  n = try
       Int(sqrt(1/4+2*y)-1/2)
  catch
       error("Invalid size of Symmetric matrix represented as vector")
  end
  A = zeros(n,n)
  for j = 1:n, i = j:n
    fac = (i==j ? 1.0 : 1.0/sqrt(2))
    A[i,j] = x[k]*fac
    k = k+1
  end
  return Symmetric(A, :L)
end

It would be nice if the projection could be done without explicitly constructing this matrix every time prox is called. In particular, there used to be a julia type SymmetricRFP and corresponding LAPACK commands to do operations on the vector form. I'm still trying to research if it is coming back or if there is a good alternative.

from proximaloperators.jl.

mfalt avatar mfalt commented on August 17, 2024

Great that you added Exp cones, that will be very useful for me! I created a PR #3 for SDP in packed matrix form, do what you want with it ;). Not sure why it failed in nightly v0.6

from proximaloperators.jl.

lostella avatar lostella commented on August 17, 2024

Last item (:SOCRotated, implemented by indRotatedSOC) solved by #13. Closing.

from proximaloperators.jl.

mfalt avatar mfalt commented on August 17, 2024

Great job! I'll definitely use this. I'm planning on releasing a package for first order methods that is using this, probably before summer. It would be nice with some input from you, so you have somewhere we could chat?

from proximaloperators.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.