-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathcore.rs
More file actions
40 lines (39 loc) · 1.46 KB
/
core.rs
File metadata and controls
40 lines (39 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pub mod cones {
#[allow(dead_code)] // Suppress warnings for unused code
#[derive(Debug)]
#[repr(C)]
pub enum ClarabelSupportedConeT<T> {
/// The zero cone (used for equality constraints).
///
/// The parameter indicates the cones dimension.
ZeroConeT(usize),
/// The nonnegative orthant.
///
/// The parameter indicates the cones dimension.
NonnegativeConeT(usize),
/// The second order cone / Lorenz cone / ice-cream cone.
///
/// The parameter indicates the cones dimension.
SecondOrderConeT(usize),
/// The exponential cone in R^3.
///
/// This cone takes no parameters
/// NB: Just a plain enum variant and not a unit type (i.e. not ExponentialConeT())
/// as in the clarabel crate to avoid ZST / FFI complaints from cbindgen
ExponentialConeT,
/// The power cone in R^3.
///
/// The parameter indicates the power.
PowerConeT(T),
/// The generalized power cone
///
/// First parameter is alpha, second is dimension of RHS
GenPowerConeT(*const T, usize, usize),
/// The positive semidefinite cone in triangular form.
///
/// The parameter indicates the matrix dimension, i.e. size = n
/// means that the variable is the upper triangle of an nxn matrix.
#[cfg(feature = "sdp")]
PSDTriangleConeT(usize),
}
}