Beispiel #1
0
void CAction::setAction(CAction P_action)
{
    if (P_action.getActionType() == CAction::E_AT_ASSIGN_FROM_SAMPLE) {
        assert(P_action.getDistribution() != NULL);
    }
    int L_i;
    setActionType   ( P_action.getActionType()   );
    setLookingPlace ( P_action.getLookingPlace() );
    setVarId        ( P_action.getVarId()        );
    setVarInId      ( P_action.getVarInId()      );
    setDoubleValue  ( P_action.getDoubleValue()  );
    setDistribution ( P_action.getDistribution() );
    setScenario     ( P_action.M_scenario        );

    setNbSubVarId   ( P_action.getNbSubVarId()   );
    for (L_i = 0; L_i < P_action.getNbSubVarId() ; L_i++ ) {
        setSubVarId (P_action.getSubVarId(L_i));
    }

    setLookingChar  ( P_action.getLookingChar()  );
    setCheckIt      ( P_action.getCheckIt()      );
    setCheckItInverse      ( P_action.getCheckItInverse()      );
    setCaseIndep    ( P_action.getCaseIndep()    );
    setOccurence    ( P_action.getOccurence()   );
    setHeadersOnly  ( P_action.getHeadersOnly()  );
    for (L_i = 0; L_i < MAX_ACTION_MESSAGE; L_i++) {
        setMessage(P_action.M_message_str[L_i], L_i);
    }
    setRegExp       ( P_action.M_regularExpression);
    setIntCmd       ( P_action.M_IntCmd          );
#ifdef PCAPPLAY
    setPcapArgs     ( P_action.M_pcapArgs        );
#endif
}
Beispiel #2
0
  /* Requires that the node is a latent variable.
   * Sets the following properties:
   *    - parent graph (from parameter)
   *    - joint distribution (from parameter)
   *    - variable (deduced from parameters)
   *    - position (deduced from parameters)
   *    - level (deduced from parameters).
   *
   * Requires Label2Index which maps the label of a variable to its index.
   */
  Node& setupProperties(Graph* graph,
                        JointDistribution& jointDist,
                        Label2Index& label2Index ) {
    plComputableObjectList objectList = jointDist.get_computable_object_list();

    setGraph(graph);
    setDistribution(jointDist);
    setVariable(objectList);
    setLabel(label2Index);
    setPosition(label2Index, objectList);
    setLevel(label2Index, objectList);
    return (*this);
    /**
    return setGraph(graph).setDistribution(jointDist)
            .setVariable(objectList).setLabel(label2Index)
            .setPosition(label2Index, objectList).setLevel(label2Index, objectList);
    */
  }