# Path: sdopt/nodes/types.py
# class ntype:
#     DIV = 'div'
#     EXP = 'exp'
#     LOG = 'log'
#     MUL = 'mul'
#     NEG = 'neg'
#     NUM = 'num'
#     POW = 'pow'
#     SQR = 'sqr'
#     SUM = 'sum'
#     VAR = 'var'
# 
# def is_var_node(node_dict):
#     return node_dict[NodeAttr.type] == ntype.VAR
# 
# Path: sdopt/nodes/attributes.py
# class NodeAttr:
#     bounds    =  1
#     con_num   =  2
#     d_term    =  3
#     display   =  4
#     input_ord =  5
#     n_term    =  6
#     name      =  7
#     node_id   =  8
#     number    =  9
#     operation = 10
#     type      = 11
#     var_num   = 12
# 
# class Bounds(namedtuple('Bounds', 'l u')):
#         __slots__ = ()
#         def __str__(self):
#             return '[%g,%g]' % (self.l, self.u)


from ..nodes.types import ntype, is_var_node
from ..nodes.attributes import NodeAttr, Bounds
    attr[NodeAttr.operation] = '+'
    attr[NodeAttr.type] = ntype.SUM

def negate(node_id, elems, attr):
    # Update if sumnode changes
    # symbol in .dag file: -#
    attr[NodeAttr.operation] = '-'
    attr[NodeAttr.type] = ntype.NEG

def mul(node_id, elems, attr):
    attr[NodeAttr.operation] = '*'
    attr[NodeAttr.type] = ntype.MUL

def div(node_id, elems, attr):
    attr[NodeAttr.operation] = '/'
    attr[NodeAttr.type] = ntype.DIV

def exp(node_id, elems, attr):
    attr[NodeAttr.operation] = 'exp'
    attr[NodeAttr.type] = ntype.EXP

def log(node_id, elems, attr):
    attr[NodeAttr.operation] = 'log'
    attr[NodeAttr.type] = ntype.LOG

def power(node_id, elems, attr):
    attr[NodeAttr.operation] = 'pow'
    attr[NodeAttr.type] = ntype.POW

def square(node_id, elems, attr):

# Path: sdopt/nodes/types.py
# class ntype:
#     DIV = 'div'
#     EXP = 'exp'
#     LOG = 'log'
#     MUL = 'mul'
#     NEG = 'neg'
#     NUM = 'num'
#     POW = 'pow'
#     SQR = 'sqr'
#     SUM = 'sum'
#     VAR = 'var'
# 
# def is_var_node(node_dict):
#     return node_dict[NodeAttr.type] == ntype.VAR
# 
# Path: sdopt/nodes/attributes.py
# class NodeAttr:
#     bounds    =  1
#     con_num   =  2
#     d_term    =  3
#     display   =  4
#     input_ord =  5
#     n_term    =  6
#     name      =  7
#     node_id   =  8
#     number    =  9
#     operation = 10
#     type      = 11
#     var_num   = 12
# 
# class Bounds(namedtuple('Bounds', 'l u')):
#         __slots__ = ()
#         def __str__(self):
#             return '[%g,%g]' % (self.l, self.u)


# Path: sdopt/parsers/node_line.py
from ..nodes.types import ntype, is_var_node
from ..nodes.attributes import NodeAttr, Bounds

    attr[NodeAttr.operation] = '+'
    attr[NodeAttr.type] = ntype.SUM

def negate(node_id, elems, attr):
    # Update if sumnode changes
    # symbol in .dag file: -#
    attr[NodeAttr.operation] = '-'
    attr[NodeAttr.type] = ntype.NEG

def mul(node_id, elems, attr):
    attr[NodeAttr.operation] = '*'
    attr[NodeAttr.type] = ntype.MUL

def div(node_id, elems, attr):
    attr[NodeAttr.operation] = '/'
    attr[NodeAttr.type] = ntype.DIV

def exp(node_id, elems, attr):
    attr[NodeAttr.operation] = 'exp'
    attr[NodeAttr.type] = ntype.EXP

def log(node_id, elems, attr):
    attr[NodeAttr.operation] = 'log'
    attr[NodeAttr.type] = ntype.LOG

def power(node_id, elems, attr):
    attr[NodeAttr.operation] = 'pow'
    attr[NodeAttr.type] = ntype.POW

def square(node_id, elems, attr):

    attr[NodeAttr.operation] = 'sqr'