当前位置: 首页>>代码示例>>Java>>正文


Java XLog.add方法代码示例

本文整理汇总了Java中org.deckfour.xes.model.XLog.add方法的典型用法代码示例。如果您正苦于以下问题:Java XLog.add方法的具体用法?Java XLog.add怎么用?Java XLog.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.deckfour.xes.model.XLog的用法示例。


在下文中一共展示了XLog.add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateNewLog

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLog(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            newT.add((XEvent) t.get(0).clone());
            for (int i = 1; i < t.size() - 1; i++) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i);
                }else {
                    removeOutlierSelect(t, newT, i);
                }
            }
            newT.add((XEvent) t.get(t.size()-1).clone());
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:33,代码来源:OutlierRemoverBridge.java

示例2: generateNewLog

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLog(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            for (int i = 0; i < lookAHead && i < t.size(); i++) {
                XEvent current = (XEvent) t.get(i).clone();
                newT.add(current);
            }

            for (int i = lookAHead; i < t.size(); i++) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i, lookAHead, true);
                }else {
                    removeOutlierSelect(t, newT, i, lookAHead, true);
                }
            }
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:36,代码来源:OutlierRemoverNextAndPrevious.java

示例3: generateNewLogReverse

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLogReverse(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            for (int i = t.size() - 1; i >= t.size() - lookAHead && i >= 0; i--) {
                XEvent current = (XEvent) t.get(i).clone();
                newT.add(current);
            }

            for (int i = t.size() - lookAHead - 1; i >= 0; i--) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i, lookAHead, true);
                }else {
                    removeOutlierSelect(t, newT, i, lookAHead, true);
                }
            }
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:36,代码来源:OutlierRemoverNextAndPrevious.java

示例4: main

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
public static void main(String[] args) {
    XFactory factory = new XFactoryNaiveImpl();
    XConceptExtension xce = XConceptExtension.instance();
    XTimeExtension xte = XTimeExtension.instance();

    XEvent a = factory.createEvent();
    xce.assignName(a, "a");

    XEvent b = factory.createEvent();
    xce.assignName(b, "b");

    XEvent c = factory.createEvent();
    xce.assignName(c, "c");

    XEvent d = factory.createEvent();
    xce.assignName(d, "d");

    XTrace trace1 = factory.createTrace();
    trace1.add(a);
    trace1.add(b);
    trace1.add(c);
    trace1.add(d);

    XTrace trace2 = factory.createTrace();
    trace2.add(a);
    trace2.add(c);
    trace2.add(b);
    trace2.add(d);

    XEvent a1 = factory.createEvent();
    xce.assignName(a1, "a");
    xte.assignTimestamp(a1, 1000000);

    XEvent b1 = factory.createEvent();
    xce.assignName(b1, "b");
    xte.assignTimestamp(b1, 2000000);

    XEvent c1 = factory.createEvent();
    xce.assignName(c1, "c");
    xte.assignTimestamp(c1, 3000000);

    XEvent d1 = factory.createEvent();
    xce.assignName(d1, "d");
    xte.assignTimestamp(d1, 4000000);

    XTrace trace3 = factory.createTrace();
    trace3.add(a1);
    trace3.add(b1);
    trace3.add(c1);
    trace3.add(d1);

    XLog log = factory.createLog();
    log.add(trace1);
    log.add(trace2);
    log.add(trace3);

    EventDistributionCalculator eventDistributionCalculator = new EventDistributionCalculatorImpl(log, new XEventNameClassifier());
    eventDistributionCalculator.analyseLog();

    Set<XEvent> events = new UnifiedSet<>();
    events.add(b1);
    events.add(c1);

    ILPApproach ilpApproach = new ILPApproach(events, eventDistributionCalculator, a1, d1, new LPSolve_Solver(), true);
    System.out.println(ilpApproach.findBestStartEnd());
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:67,代码来源:ILPApproach.java


注:本文中的org.deckfour.xes.model.XLog.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。