Package org.integratedmodelling.riskwiz.domain

Examples of org.integratedmodelling.riskwiz.domain.DiscreteDomain


        double volume = 1;

        Object val;

        int k = productStructureIterator[0];
        DiscreteDomain ddom = dmap.getDiscretizedDomain(function.getDomain(), bn);

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

            val = new Double(idom.getAvarage(k));

            volume *= idom.getWidth(k);

        } else {
            val = ddom.getState(k);

        }

        Vector<DiscreteDomain> pdoms = dmap.getDiscretizedParentDomains();
        List args = new LinkedList();

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

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

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

                args.add(aval);
                volume *= idom.getWidth(j);

            } else {
                String sval = dpdom.getState(j);

                args.add(sval);
            }

        }
View Full Code Here


        int[] productStructureIterator = this.index2addr(0);
        boolean done = false;

        while (!done) {
            for (int i = 0; i < productStructureIterator.length; i++) {
                DiscreteDomain dom = domainProduct.elementAt(i);

                ret.put(dom.getState(productStructureIterator[i]),
                        this.getValue(productStructureIterator));
            }
            done = this.addOne(productStructureIterator);
        }
        return ret;
View Full Code Here

    public int size() {
        return size;
    }

    private CPT toDistribution(CPT cpt) {
        DiscreteDomain dom = cpt.getDomain();
        DiscreteDomain parentDom = cpt.getParentsDomains().firstElement();
        CPT distribution = new CPT(dom, cpt.getParentsDomains());

        for (int parentIndex = 0; parentIndex < parentDom.getOrder(); parentIndex++) {
            double sum = 0;

            for (int domIndex = dom.getOrder() - 1; domIndex >= 0; domIndex--) {
                int[] addres = new int[2];
View Full Code Here

        return new TabularDF(dom);
    }
 
    public static TabularCPD createCPF(String name, int order) {
        DiscreteDomain dom = new DiscreteDomain(name, order);

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

        return new TabularCPD(dom, null);
    }
 
    public static TabularDF createDF(String name, int order) {
        DiscreteDomain dom = new DiscreteDomain(name, order);

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

    public void setDiscretizedDomain(DiscreteDomain  dom) {
        discretizedDomain = dom;
    }
 
    public void setIntervalDomain(double from, double to, int numberOfIntervals) {
        DiscreteDomain dom = new IntervalDomain(this.name, from, to,
                numberOfIntervals);

        function.setDomain(dom);
        if (noisyT != null) {
            noisyT.setDomain(dom);
View Full Code Here

            noisyT.setDomain(dom);
        }
    }
 
    public void setLabelDomain(String[] labels) {
        DiscreteDomain dom = new LabelDomain(this.name, labels);

        function.setDomain(dom);
        if (noisyT != null) {
            noisyT.setDomain(dom);
        }
View Full Code Here

TOP

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

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.