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

Errors in ZeroConeT and NonNegativeConeT definitions #48

Open
nielsvd opened this issue Oct 1, 2024 · 0 comments
Open

Errors in ZeroConeT and NonNegativeConeT definitions #48

nielsvd opened this issue Oct 1, 2024 · 0 comments

Comments

@nielsvd
Copy link

nielsvd commented Oct 1, 2024

I haven't reached the point where I can test whether this causes any faulty behavior, but I found an inconsistency in the definitions of ZeroConeT and NonNegativeConeT. See:

this->nonnegative_cone_t = { dimension };

and

this->zero_cone_t = { dimension };

I suppose it should instead be something like:

template<typename T = double>
struct ZeroConeT : public SupportedConeT<T>
{
  public:
    ZeroConeT(uintptr_t dimension)
    {
        this->tag = SupportedConeT<T>::Tag::ZeroConeT;
        ///old: this->nonnegative_cone_t = { dimension };
        this->zero_cone_t = { dimension };
    }

    uintptr_t dimension() const { return this->zero_cone_t._0; }
};

template<typename T = double>
struct NonnegativeConeT : public SupportedConeT<T>
{
  public:
    NonnegativeConeT(uintptr_t dimension)
    {
        this->tag = SupportedConeT<T>::Tag::NonnegativeConeT;
        ///old: this->zero_cone_t = { dimension };
        this->nonnegative_cone_t = { dimension };
    }

    uintptr_t dimension() const { return this->nonnegative_cone_t._0; }
};

There may be other side effects I haven't had the chance to investigate yet.

Clarabel looks like a great tool. I look forward to testing it! Thanks!

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

No branches or pull requests

1 participant