Package unbbayes.prs.mebn.ssbn

Examples of unbbayes.prs.mebn.ssbn.OVInstance


   
    // Set up query
    List<OVInstance> ovInstanceList = new ArrayList<OVInstance>(1);
    List<Argument> arglist = queryNode.getArgumentList();
    OrdinaryVariable ov = arglist.get(0).getOVariable();
    OVInstance ovInstance = OVInstance.getInstance(ov,
        LiteralEntityInstance.getInstance("ship" + ship.getID(), ov.getValueType()));
    ovInstanceList.add(ovInstance);
    
    // Create query
    return new Query(queryNode, ovInstanceList);
View Full Code Here


   
    // Set up query
    List<OVInstance> ovInstanceList = new ArrayList<OVInstance>(1);
    List<Argument> arglist = queryNode.getArgumentList();
    OrdinaryVariable ov = arglist.get(0).getOVariable();
    OVInstance ovInstance = OVInstance.getInstance(ov,
        LiteralEntityInstance.getInstance("ship" + ship.getID(), ov.getValueType()));
    ovInstanceList.add(ovInstance);
   
   
    // Create and run query
View Full Code Here

    ObjectEntity objectEntityOrdereable = residentNode.getMFrag().
                        getMultiEntityBayesianNetwork().getObjectEntityContainer().
                        getObjectEntityByType(ovOrdereable.getValueType());
 
    LiteralEntityInstance ovOrdereableActualValue = node.getEntityForOv(ovOrdereable);
    OVInstance ovInstanceOrdereable = OVInstance.getInstance(ovOrdereable, ovOrdereableActualValue);
   
    if(ovInstanceOrdereable == null){
      throw new SSBNNodeGeneralException();
    }
   
    String nameEntity = ovInstanceOrdereable.getEntity().getInstanceName();
   
    ObjectEntityInstanceOrdereable objectEntityInstanceOrdereable =
      (ObjectEntityInstanceOrdereable)objectEntityOrdereable.getInstanceByName(nameEntity);
   
    if(objectEntityInstanceOrdereable == null){
View Full Code Here

      correspondencyMap.put(simple, ssbnNode);
      listSSBNNodes.add(ssbnNode);
     
      //Arguments.
      for(int i = 0; i < simple.getOvArray().length; i++){
        OVInstance ovInstance = OVInstance.getInstance(
            simple.getOvArray()[i],  simple.getEntityArray()[i]);
        ssbnNode.addArgument(ovInstance);
      }
     
      //Finding.
      if(simple.isFinding()){
        ssbnNode.setValue(simple.getState());
      }
     
     
      //Default distribution
      if(simple.isDefaultDistribution()){
        ssbnNode.setUsingDefaultCPT(true);
      }
     
      ssbnNode.setPermanent(true);
     
      //The values of the ordinary variables are different dependeing on what MFrag we are dealing
     
      // lets deal first at resident node's MFrag
      OrdinaryVariable[] residentOvArray = ssbnNode.getResident().getOrdinaryVariableList().toArray(
                              new OrdinaryVariable[ssbnNode.getResident().getOrdinaryVariableList().size()]
                          );
     
      List<OVInstance> argumentsForResidentMFrag = new ArrayList<OVInstance>();
      for(int i = 0; i < residentOvArray.length; i++){
        OVInstance ovInstance = OVInstance.getInstance(residentOvArray[i], simple.getEntityArray()[i]);
        argumentsForResidentMFrag.add(ovInstance);
      }
     
      ssbnNode.addArgumentsForMFrag(
          ssbnNode.getResident().getMFrag(),
          argumentsForResidentMFrag);
     
     
      // lets map OVs of every input node pointing to current SSBNNode
      for(InputNode inputNode: simple.getResidentNode().getInputInstanceFromList()){
        OrdinaryVariable[] ovArray =
          inputNode.getResidentNodePointer().getOrdinaryVariableArray();
       
        List<OVInstance> argumentsForMFrag = new ArrayList<OVInstance>();
        for(int i = 0; i < ovArray.length; i++){
          OVInstance ovInstance = OVInstance.getInstance(ovArray[i], simple.getEntityArray()[i]);
          argumentsForMFrag.add(ovInstance);
        }
       
        ssbnNode.addArgumentsForMFrag(
            inputNode.getMFrag(),
View Full Code Here

      for (Integer shipID : queryJob.getShipIDs()) {
        // Set up query
        List<OVInstance> ovInstanceList = new ArrayList<OVInstance>(1);
        List<Argument> arglist = queryNode.getArgumentList();
        OrdinaryVariable ov = arglist.get(0).getOVariable();
        OVInstance ovInstance = OVInstance.getInstance(ov,
            LiteralEntityInstance.getInstance("ship" + shipID, ov.getValueType()));
        ovInstanceList.add(ovInstance);
       
       
        Query query = new Query(queryNode, ovInstanceList);
View Full Code Here

TOP

Related Classes of unbbayes.prs.mebn.ssbn.OVInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.