Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::SecondOrderConeConstraint Class Reference

#include <second_order_cone_constraint.h>

Public Types

using IdType = SecondOrderConeConstraintId
 The typed integer used for ids.
 

Public Member Functions

 SecondOrderConeConstraint (const ModelStorage *storage, SecondOrderConeConstraintId id)
 
int64_t id () const
 
SecondOrderConeConstraintId typed_id () const
 
const ModelStorage * storage () const
 
absl::string_view name () const
 
LinearExpression UpperBound () const
 
std::vector< LinearExpressionArgumentsToNorm () const
 
std::vector< VariableNonzeroVariables () const
 
std::string ToString () const
 

Friends

bool operator== (const SecondOrderConeConstraint &lhs, const SecondOrderConeConstraint &rhs)
 
bool operator!= (const SecondOrderConeConstraint &lhs, const SecondOrderConeConstraint &rhs)
 
template<typename H >
AbslHashValue (H h, const SecondOrderConeConstraint &constraint)
 
std::ostream & operator<< (std::ostream &ostr, const SecondOrderConeConstraint &constraint)
 

Detailed Description

A value type that references a second-order cone constraint from ModelStorage. Usually this type is passed by copy.

This type implements https://abseil.io/docs/cpp/guides/hash.

Definition at line 37 of file second_order_cone_constraint.h.

Member Typedef Documentation

◆ IdType

The typed integer used for ids.

Definition at line 40 of file second_order_cone_constraint.h.

Constructor & Destructor Documentation

◆ SecondOrderConeConstraint()

operations_research::math_opt::SecondOrderConeConstraint::SecondOrderConeConstraint ( const ModelStorage * storage,
SecondOrderConeConstraintId id )
inline

Definition at line 141 of file second_order_cone_constraint.h.

Member Function Documentation

◆ ArgumentsToNorm()

std::vector< LinearExpression > operations_research::math_opt::SecondOrderConeConstraint::ArgumentsToNorm ( ) const

Returns "arguments_to_norm" with respect to a constraint of the form |arguments_to_norm|₂ ≤ upper_bound.

Definition at line 37 of file second_order_cone_constraint.cc.

◆ id()

int64_t operations_research::math_opt::SecondOrderConeConstraint::id ( ) const
inline

Inline function implementations

Definition at line 93 of file second_order_cone_constraint.h.

◆ name()

absl::string_view operations_research::math_opt::SecondOrderConeConstraint::name ( ) const
inline

Definition at line 103 of file second_order_cone_constraint.h.

◆ NonzeroVariables()

std::vector< Variable > operations_research::math_opt::SecondOrderConeConstraint::NonzeroVariables ( ) const
inline

Returns all variables that appear in the second-order cone constraint with a nonzero coefficient. Order is not defined.

Definition at line 110 of file second_order_cone_constraint.h.

◆ storage()

const ModelStorage * operations_research::math_opt::SecondOrderConeConstraint::storage ( ) const
inline

Definition at line 99 of file second_order_cone_constraint.h.

◆ ToString()

std::string operations_research::math_opt::SecondOrderConeConstraint::ToString ( ) const

Returns a detailed string description of the contents of the constraint (not its name, use << for that instead).

Definition at line 48 of file second_order_cone_constraint.cc.

◆ typed_id()

SecondOrderConeConstraintId operations_research::math_opt::SecondOrderConeConstraint::typed_id ( ) const
inline

Definition at line 95 of file second_order_cone_constraint.h.

◆ UpperBound()

LinearExpression operations_research::math_opt::SecondOrderConeConstraint::UpperBound ( ) const

Returns "upper_bound" with respect to a constraint of the form |arguments_to_norm|₂ ≤ upper_bound.

Definition at line 32 of file second_order_cone_constraint.cc.

Friends And Related Symbol Documentation

◆ AbslHashValue

template<typename H >
H AbslHashValue ( H h,
const SecondOrderConeConstraint & constraint )
friend

Definition at line 125 of file second_order_cone_constraint.h.

◆ operator!=

bool operator!= ( const SecondOrderConeConstraint & lhs,
const SecondOrderConeConstraint & rhs )
friend

Definition at line 119 of file second_order_cone_constraint.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & ostr,
const SecondOrderConeConstraint & constraint )
friend

Streams the name of the constraint, as registered upon constraint creation, or a short default if none was provided.

Todo
(b/170992529): handle quoting of invalid characters in the name.

Definition at line 129 of file second_order_cone_constraint.h.

◆ operator==

bool operator== ( const SecondOrderConeConstraint & lhs,
const SecondOrderConeConstraint & rhs )
friend

Definition at line 114 of file second_order_cone_constraint.h.


The documentation for this class was generated from the following files: