Belle II Software  release-06-01-15
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 17 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 22 of file constraints.py.

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

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
  coefficent of the parameter in constraint

Definition at line 38 of file constraints.py.

◆ get_checksum()

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

Definition at line 52 of file constraints.py.


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