Skip to content

scram::core::Constant

Representation of a node that is a Boolean constant TRUE. More...

#include <pdag.h>

Inherits from scram::core::Node, scram::core::NodeParentManager, boost::noncopyable

Public Functions

Name
boolvalue() const

Friends

Name
classPdag

Additional inherited members

Public Functions inherited from scram::core::Node

Name
virtual~Node() =0<br>Abstract class.
Pdag &graph()
intindex() const
intorder() const
voidorder(int val)<br>Sets the order number for this node.
intopti_value() const
voidopti_value(int val)<br>Sets the optimization value for failure propagation.
boolVisit(int time)<br>Registers the visit time for this node upon graph traversal.
intEnterTime() const
intExitTime() const
intLastVisit() const
virtual intmin_time() const
virtual intmax_time() const
boolRevisited() const
boolVisited() const
voidClearVisits()<br>Clears all the visit information. Resets the visit times to 0s.
intpos_count() const
intneg_count() const
voidAddCount(bool positive)<br>Increases the count of this node.
voidResetCount()<br>Resets positive and negative counts of this node.

Public Types inherited from scram::core::NodeParentManager

Name
using std::pair< int, GateWeakPtr >Parent <br>Parent index and ptr.
using ext::linear_map< int, GateWeakPtr, ext::MoveEraser >ParentMap <br>A map type of parent gate positive indices and weak pointers to them.

Public Functions inherited from scram::core::NodeParentManager

Name
const ParentMap &parents() const

Protected Functions inherited from scram::core::NodeParentManager

Name
~NodeParentManager() =default

Friends inherited from scram::core::NodeParentManager

Name
classGate <br>The main manipulator of parent information.

Detailed Description

cpp
class scram::core::Constant;

Representation of a node that is a Boolean constant TRUE.

The Node index 1 is reserved for this special argument. There's only one constant per graph. FALSE is represented as NOT TRUE with -1 as its index.

Public Functions Documentation

function value

cpp
inline bool value() const

Return: The constant Boolean value.

Friends

friend Pdag

cpp
friend class Pdag(
    Pdag 
);

Updated on 2025-11-11 at 16:51:08 +0000