Package org.integratedmodelling.riskwiz.domain

Examples of org.integratedmodelling.riskwiz.domain.IntervalDomain


                                + IOUtil.mangleXMLString(j.next().toString())
                                + "\" />" + ln);
            }
        } else if (node.getDomType() == DomainType.intervals) {
            w.write("    type=\"intervals\" >" + ln);
            IntervalDomain idom = (IntervalDomain) node.getDomain();

            // valueCache.put(nodeName, values);

            w.write(tab + "    ");
            if (idom.hasEverPartition()) {
                w.write(
                        "<states min=\"" + idom.getMin() + "\"" + "max=\""
                        + idom.getMax() + "\"" + "order=\"" + idom.getOrder()
                        + "\" />" + ln);
            } else {
                w.write(
                        "<states>" + IOUtil.statesString(idom.getStateBorders())
                        + "</states>" + ln);
            }

        } else if (node.getDomType() == DomainType.continuous) {
            w.write("    type=\"expressions\" >" + ln);
View Full Code Here


        return new DT(dom);
    }
 
    public static CPT createCPT(String name, double from, double to, int numberOfIntervals) {
        IntervalDomain dom = new IntervalDomain(name, from, to,
                numberOfIntervals);

        return new CPT(dom, null);
    }
View Full Code Here

        return new CPT(dom, null);
    }
 
    public static DT createDT(String name, double from, double to, int numberOfIntervals) {
        IntervalDomain dom = new IntervalDomain(name, from, to,
                numberOfIntervals);

        return new DT(dom);
    }
View Full Code Here

            BeliefNetwork bn) {
        for (Domain dom : parentDomains) {

            if (dom  instanceof ContinuousDomain) {
        
                IntervalDomain idom = getDiscretizedDomain(
                        dom, bn);

                this.discretizedParentDomains.add(idom);
        
            } else {
View Full Code Here

    }

    public static void createDiscreteDomain(BNNode node) {
        if (node.getDomain() instanceof ContinuousDomain) {

            IntervalDomain ddom = discretizeDomain(
                    (ContinuousDomain) node.getDomain());

            node.setDiscretizedDomain(ddom);
        } else {
            node.setDiscretizedDomain((DiscreteDomain) node.getDomain());
View Full Code Here

        node.setWeight(node.getDiscretizedDomain().getOrder());

    }

    public static IntervalDomain discretizeDomain(ContinuousDomain dom) {
        return new IntervalDomain(dom.getName(), dom.getMin(), dom.getMax(),
                dom.getDiscretizationOrder());
    }
View Full Code Here

        List<Object>  args = new LinkedList<Object>();
        Vector<BNNode> parents = node.getOrderedParents();

        for (BNNode parentNode : parents) {
            if (parentNode.getDomain() instanceof IntervalDomain) {
                IntervalDomain idom = (IntervalDomain) parentNode.getDomain();
       
                // happens only in a bridge from discrete parents to continuous nodes
                args.add(
                        idom.getAvarage((Integer) parentNode.getCurrentSample()));
            } else {
                args.add(parentNode.getCurrentSample());
            }
        }
        return args;
View Full Code Here

                    LabelDomain dom = new LabelDomain(bbnnode.getName(), valArr);

                    bbnnode.setDomain(dom);

                } else if (domtype.equals("intervals")) {
                    IntervalDomain dom;

                    if (hasEvenParticion) {
                        dom = new IntervalDomain(bbnnode.getName(), min, max,
                                order);
                    } else {
                        dom = new IntervalDomain(bbnnode.getName(), states);
                    }
                    bbnnode.setDomain(dom);
                    RT.addVariable(bbnnode.getName(), min);

                } else if (domtype.equals("expressions")) {
View Full Code Here

        for (int i = 0; i < productStructureIterator.length; i++) {
            int j = productStructureIterator[i];
            DiscreteDomain ddom = pdoms.elementAt(i);

            if (ddom instanceof IntervalDomain) {
                IntervalDomain idom = (IntervalDomain) ddom;

                Double aval = new Double(idom.getAvarage(j));

                args.add(aval);

            } else {
                String sval = ddom.getState(i);
View Full Code Here

        for (int i = 0; i < productStructureIterator.length; i++) {
            int j = productStructureIterator[i];
            DiscreteDomain ddom = pdoms.elementAt(i);

            if (ddom instanceof IntervalDomain) {
                IntervalDomain idom = (IntervalDomain) ddom;

                Double aval = new Double(idom.getAvarage(j));

                args.add(aval);

            } else {
                String sval = ddom.getState(i);
View Full Code Here

TOP

Related Classes of org.integratedmodelling.riskwiz.domain.IntervalDomain

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.