Belle II Software  release-08-01-10
Constraint Class Reference

Public Member Functions

def __init__ (self, comment="", value=0.)
 
def add (self, label, coeff)
 
def get_checksum (self)
 

Public Attributes

 value
 Value.
 
 comment
 Comment.
 
 data
 Data.
 

Detailed Description

Class representing a linear constraint for global parameters

Definition at line 16 of file constraints.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  comment = "",
  value = 0. 
)
Initialize constraint

comment : str
  TODO: Not yet used
value : float
  The constant term of the constraint: sum(c_i * par_i) = value

Definition at line 21 of file constraints.py.

21  def __init__(self, comment="", value=0.):
22  """
23  Initialize constraint
24 
25  comment : str
26  TODO: Not yet used
27  value : float
28  The constant term of the constraint: sum(c_i * par_i) = value
29  """
30 
31  self.value = value
32 
33  self.comment = comment
34 
35  self.data = []
36 

Member Function Documentation

◆ add()

def add (   self,
  label,
  coeff 
)
Add coefficient for a global parameter

Parameters
----------
label : int
  global parameter id (GlobalLabel::label())
coeff : float
  coefficient of the parameter in constraint

Definition at line 37 of file constraints.py.

◆ get_checksum()

def get_checksum (   self)
Get a checksum to distinguish constraints quickly (computed only from labels)

Definition at line 51 of file constraints.py.


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