downloaded from propka.ki.ku.dk
This commit is contained in:
26
Source/determinant.py
Normal file
26
Source/determinant.py
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
class Determinant:
|
||||
"""
|
||||
Determinant class - set up for later structurization
|
||||
"""
|
||||
|
||||
def __init__(self, group, value):
|
||||
"""
|
||||
Contructer of determinant object - simple, but helps in creating structure!
|
||||
"""
|
||||
self.group = group
|
||||
self.label = group.label
|
||||
self.value = value
|
||||
|
||||
return
|
||||
|
||||
def add(self, value):
|
||||
"""
|
||||
adding a value to determinant
|
||||
"""
|
||||
self.value += value
|
||||
|
||||
return
|
||||
|
||||
def __str__(self):
|
||||
return '%s: %8.2f'%(self.label,self.value)
|
||||
Reference in New Issue
Block a user