Promoter.execConstant C# (CSharp) Method

execConstant() private method

private execConstant ( TreeNode node, ArrayList molecules ) : float
node TreeNode
molecules ArrayList
return float
    private float execConstant(TreeNode<PromoterNodeData> node, ArrayList molecules)
    {
        if (node == null)
          return 0f;

        if (node.getRightNode().getData().token == PromoterParser.eNodeType.BOOL)
          return execBool(node.getRightNode());
        Molecule mol = execWord(node.getRightNode(), molecules);
        float K = execNum(node.getLeftNode(), molecules);
        float n = 1f;
        if (node.getLeftNode() != null && node.getLeftNode().getLeftNode() != null)
          n = execNum(node.getLeftNode().getLeftNode(), molecules);
        //     Debug.Log("concentration de " + mol.getName() + " = " + mol.getConcentration());
        //     return stepFunc(K, mol.getConcentration());
        //     if (mol.getName() == "Y")
        //       Debug.Log("hill : " + hillFunc(K, mol.getConcentration(), 4));
        //     else
        //       Debug.Log(mol.getName());
        //     return stepFunc(K, mol.getConcentration());
        return hillFunc(K, mol.getConcentration(), n);
    }