• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



XEvent类属于org.deckfour.xes.model包,在下文中一共展示了XEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getStringOfXEvents

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public static <T extends XEvent> StringBuilder getStringOfXEvents(HashMap<String, T> events){

		Iterator<Entry<String, T>> evit = events.entrySet().iterator();
		StringBuilder info = new StringBuilder("");
		
		while(evit.hasNext()){
			Entry<String, T> xee = (Entry<String, T>) evit.next();
			XEvent xe = xee.getValue();
			
			info.append(LEConstants.LOGGER_LINE+"\n");
			info.append("XEvent URI: \t"+xee.getKey()+"\n");

			//handling event's attributes
			XAttributeMap xattmap = xe.getAttributes();
			info.append(getStringOfXAttributeMap("\t", xattmap));
			//END OF handling event's attributes
		}
		
		return 	info;
	}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:Print.java


示例2: codeLog

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private List<IntArrayList> codeLog(XLog log) {
    List<IntArrayList> codedLog = new ArrayList<>(log.size());
    for(XTrace trace : log) {
        IntArrayList list = new IntArrayList(trace.size());
        for(XEvent event : trace) {
            String name = xEventClassifier.getClassIdentity(event);
            Integer value;
            if((value = stringToIntMap.get(name)) > 0) {
                list.add(value);
            }else {
                stringToIntMap.put(name, events);
                intToStringMap.put(events, name);
                list.add(events);
                events++;
            }
        }
        codedLog.add(list);
    }
    return codedLog;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:LabelFilter.java


示例3: getPermutationTechnique

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public static PermutationTechnique getPermutationTechnique(int approach, Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end, boolean debug_mode) {
    if(approach == PermutationTechnique.HEURISTICS_SET) {
        return new HeuristicSetSolutions(events, eventDistributionCalculator, start, end);
    }else if(approach == PermutationTechnique.HEURISTICS_BEST) {
        return new HeuristicBestSolution(events, eventDistributionCalculator, start, end);
    }else if(approach == PermutationTechnique.ILP_GUROBI) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new Gurobi_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_LPSOLVE) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new LPSolve_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_GUROBI_ARCS) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new Gurobi_Solver(), debug_mode);
    }else if(approach == PermutationTechnique.ILP_LPSOLVE_ARCS) {
        return new ILPApproach(events, eventDistributionCalculator, start, end, new LPSolve_Solver(), debug_mode);
    }
    return null;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:17,代码来源:PermutationTechniqueFactory.java


示例4: findEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private XEvent findEnd(XTrace trace, XEvent start, Set<XEvent> events) {
        boolean foundStart = false;
//        for(int i = 0; i < trace.size(); i++) {
//            if(!foundStart && start == trace.get(i)) {
//                foundStart = true;
//                continue;
//            }
//            if(foundStart && !events.contains(trace.get(i))) return trace.get(i);
//        }
        for(XEvent event : trace) {
            if(!foundStart && start == event) {
                foundStart = true;
                continue;
            }
            if(foundStart && !events.contains(event)) return event;
        }
        return null;
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:19,代码来源:EventPermutatorSmart.java


示例5: build

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void build(XEvent event1, XEvent event2, boolean smart) {
    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(getEventName(event1));
    Outlier<String> outlier = new Outlier<String>(getEventName(event2), outlierIdentifier, true);
    map.addOutlier(outlier);

    if(smart) {
        if(existingDependencies.get(getEventName(event1)) != null) {
            if(existingDependencies.get(getEventName(event1)).contains(getEventName(event2))) {
                map.increaseFrequency(outlier);
                map.increaseIdentifierFrequency(outlierIdentifier);
            }else {
                map.setFrequency(outlier, 0.0);
            }
        }else {
            System.out.println("ERROR");
        }
    }else {
        map.increaseFrequency(outlier);
        map.increaseIdentifierFrequency(outlierIdentifier);
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:OutlierMapBuilderNextAndPrevious.java


示例6: HeuristicSetSolutions

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public HeuristicSetSolutions(Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end) {
    this.eventDistributionCalculator = eventDistributionCalculator;
    this.eventsArray = events.toArray(new XEvent[events.size() + 2]);
    Arrays.sort(eventsArray, new Comparator<XEvent>() {
        XEventClassifier xEventClassifier = new XEventAndClassifier(new XEventNameClassifier(), new XEventLifeTransClassifier());
        @Override
        public int compare(XEvent o1, XEvent o2) {
            if(o1 != null && o2 != null) return xEventClassifier.getClassIdentity(o1).compareTo(xEventClassifier.getClassIdentity(o2));
            else if(o1 == null) return 1;
            else return -1;
        }
    });
    this.eventsArray[eventsArray.length - 2] = start;
    this.eventsArray[eventsArray.length - 1] = end;
    this.likeloods = new double[events.size() + 2][events.size() + 2];
    computeLikelihoods();
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:HeuristicSetSolutions.java


示例7: ILPApproach

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public ILPApproach(Set<XEvent> events, EventDistributionCalculator eventDistributionCalculator, XEvent start, XEvent end, ILPSolver solver, boolean debug_mode) {
    this.debug_mode = debug_mode;
    this.solver = solver;
    this.eventDistributionCalculator = eventDistributionCalculator;
    this.eventsArray = events.toArray(new XEvent[events.size() + 2]);
    Arrays.sort(eventsArray, new Comparator<XEvent>() {
        XEventClassifier xEventClassifier = new XEventAndClassifier(new XEventNameClassifier(), new XEventLifeTransClassifier());
        @Override
        public int compare(XEvent o1, XEvent o2) {
            if(o1 != null && o2 != null) return xEventClassifier.getClassIdentity(o1).compareTo(xEventClassifier.getClassIdentity(o2));
            else if(o1 == null) return 1;
            else return -1;
        }
    });
    this.eventsArray[eventsArray.length - 2] = start;
    this.eventsArray[eventsArray.length - 1] = end;
    this.likeloods = new double[events.size() + 2][events.size() + 2];
    computeLikelihoods();
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:ILPApproach.java


示例8: computeLikelihoods

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void computeLikelihoods() {
        List<XEvent> list = new ArrayList<>(2);
        for(int i = 0; i < eventsArray.length; i++) {
            for(int j = 0; j < eventsArray.length; j++) {
                if(i != j) {
                    list.clear();
                    list.add(0, eventsArray[i]);
                    list.add(1, eventsArray[j]);
                    likeloods[i][j] = eventDistributionCalculator.computeLikelihood(list);
                    if(i == eventsArray.length - 1 && j == eventsArray.length - 2) {
                        likeloods[i][j] = 1.0;
                    }
                    if(likeloods[i][j] > 0.0) {
                        numberOfArcs++;
//                        likeloods[i][j] *= 10.0;
                    }
                    numberOfArcswithZero++;
                }else {
                    likeloods[i][j] = 0.0;
                }
            }
        }
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:24,代码来源:ILPApproach.java


示例9: computeEnrichedLikelihoods

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void computeEnrichedLikelihoods() {
        numberOfArcs = 0;
        numberOfArcswithZero = 0;
        List<XEvent> list = new ArrayList<>(2);
        for(int i = 0; i < eventsArray.length; i++) {
            for(int j = 0; j < eventsArray.length; j++) {
                if(i != j) {
                    list.clear();
                    list.add(0, eventsArray[i]);
                    list.add(1, eventsArray[j]);
                    likeloods[i][j] = eventDistributionCalculator.computeEnrichedLikelihood(list);
                    if(i == eventsArray.length - 1 && j == eventsArray.length - 2) {
                        likeloods[i][j] = 1.0;
                    }
                    if(likeloods[i][j] > 0.0) {
                        numberOfArcs++;
//                        likeloods[i][j] *= 10.0;
                    }
                    numberOfArcswithZero++;
                }else {
                    likeloods[i][j] = 0.0;
                }
            }
        }
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:26,代码来源:ILPApproach.java


示例10: removeOutlierSelect

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void removeOutlierSelect(XTrace t, XTrace newT, int i) {
    XEvent before = t.get(i - 1);
    XEvent guilty = t.get(i);
    XEvent after = t.get(i + 1);

    String nameBefore = getEventName(before);
    String nameGuilty = getEventName(guilty);
    String nameAfter = getEventName(after);

    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(nameBefore, nameAfter);
    Set<Outlier<String>> set = mapOutliers.getOutliers(outlierIdentifier);
    Outlier<String> outlier = new Outlier<String>(nameGuilty, outlierIdentifier, false);

    if (set == null || !set.contains(outlier)) {
        newT.add((XEvent) t.get(i).clone());
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:OutlierRemoverBridge.java


示例11: doesProcessInstanceAlwaysEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private boolean doesProcessInstanceAlwaysEnd(Entity grandParent, Set<String> eventNames, UnifiedMap<Entity, XLog> logs) {
    XLog log = logs.get(grandParent);

    boolean correct = false;
    for (XTrace trace : log) {
        boolean occurs = false;
        for (XEvent event : trace) {
            if (eventNames.contains(xce.extractName(event))) {
                occurs = true;
                correct = true;
                break;
            }
        }
        if (occurs && !eventNames.contains(xce.extractName(trace.get(trace.size() - 1)))) {
            correct = false;
            break;
        }
    }
    return correct;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:SubProcessTypeDiscoverer.java


示例12: checkIfOutlier

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private void checkIfOutlier(Map<Outlier<String>, Integer> removed, XTrace t, int i, int lookAHead, boolean directOrReverse) {
    XEvent current = directOrReverse?t.get((i - lookAHead)):t.get((i + lookAHead));
    XEvent next = t.get(i);
    String nameCurrent = getEventName(current);
    String nameNext = getEventName(next);

    OutlierIdentifier outlierIdentifier = outlierIdentifierGenerator.generate(nameCurrent);
    Set<Outlier<String>> set = mapOutliers.getOutliers(outlierIdentifier);
    Outlier<String> outlier = new Outlier<String>(nameNext, outlierIdentifier, false);

    if (set != null && set.contains(outlier)) {
        Integer val;
        if ((val = removed.get(outlier)) == null) {
            val = 0;
        }
        val++;
        removed.put(outlier, val);
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:OutlierRemoverNextAndPrevious.java


示例13: isXEventFromLastActivity

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private boolean isXEventFromLastActivity(BPMNDiagram process, XEvent event) {

        boolean found = false;
        for (Event e : process.getEvents()) {
            if (e.getEventType().equals(Event.EventType.END)) {
                for (Activity activity : getPreviousActivities(process, e, null)) {
                    if (bpmnAnalizer.extractActivityLabel(activity).equals(xce.extractName(event))) {
                        found = true;
                        break;
                    }
                }
                if (found) break;
            }
        }

        return found;
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:SubProcessTypeDiscoverer.java


示例14: removeRedundantPathToEnd

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private BPMNDiagram removeRedundantPathToEnd(BPMNDiagram subProcess, XLog log, Set<String> bpmnDiagrams) {
    Set<String> possibleActivitiesToCheck = new UnifiedSet<String>();

    for (XTrace trace : log) {
        XEvent last = null;
        for (XEvent event : trace) {
            if (last != null) {
                String name = xce.extractName(event);
                if (bpmnDiagrams.contains(name)) {
                    possibleActivitiesToCheck.add(xce.extractName(last));
                    break;
                }
            }
            last = event;
        }
    }

    return removePath(subProcess, possibleActivitiesToCheck);
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:BPMNSubProcessMiner.java


示例15: removeRedundantPathToEndAfterActivities

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private BPMNDiagram removeRedundantPathToEndAfterActivities(BPMNDiagram subProcess, XLog log, Set<String> bpmnDiagrams) {
    Set<String> possibleActivitiesToCheck = new UnifiedSet<String>();

    for (XTrace trace : log) {
        XEvent last = null;
        for (XEvent event : trace) {
            if (last != null) {
                String name = xce.extractName(event);
                if (bpmnDiagrams.contains(name)) {
                    possibleActivitiesToCheck.add(xce.extractName(event));
                    break;
                }
            }
            last = event;
        }
    }

    return removePath(subProcess, possibleActivitiesToCheck);

}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:BPMNSubProcessMiner.java


示例16: createGraph

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public Graph createGraph(XLog log, String event_label) {
    Graph graph = new Graph();

    ArrayList<XEvent> pre_window = new ArrayList<>(window_size);
    ArrayList<XEvent> post_window = new ArrayList<>(window_size);
    XEvent center_element = null;

    for(XTrace trace : log) {
        pre_window.clear();
        post_window.clear();
        center_element = null;
        for(int i = 0; i < trace.size(); i++) {
            center_element = shiftWindows(pre_window, post_window, center_element, trace.get(i));
            if(center_element != null) {
                System.out.println(toString(pre_window) + " " + toString(center_element) + " " + toString(post_window));
            }
        }
    }

    return graph;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:GraphFactory.java


示例17: shiftWindows

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
private XEvent shiftWindows(ArrayList<XEvent> pre_window, ArrayList<XEvent> post_window, XEvent center_element, XEvent new_element) {
    post_window.add(new_element);

    XEvent new_center_element;
    if(post_window.size() > window_size) {
        new_center_element = post_window.remove(0);
        pre_window.add(center_element);
        if (pre_window.size() > window_size) {
            pre_window.remove(0);
        }
    }else {
        new_center_element = center_element;
    }

    return new_center_element;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:17,代码来源:GraphFactory.java


示例18: fixDate

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public Date fixDate(XTrace trace, int eventPos, int prePos, int postPos) {
    XEvent event = trace.get(eventPos);
    Date date1;
    if(prePos >= 0) {
        date1 = xte.extractTimestamp(trace.get(prePos));
        if (date1 == null) {
            date1 = fixDate(trace, prePos, prePos - 1, postPos);
        }
    }else {
        date1 = new Date(0);
    }

    Date date2;
    if(postPos < trace.size()) {
        date2 = xte.extractTimestamp(trace.get(postPos));
        if (date2 == null) {
            date2 = fixDate(trace, postPos, prePos, postPos + 1);
        }
    }else {
        date2 = new Date(Long.MAX_VALUE);
    }
    Date date3 = new Date((date2.getTime() + date1.getTime())/ 2);
    xte.assignTimestamp(event, date3);
    return date3;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:26,代码来源:NoiseGenerator.java


示例19: computeLikelihoodWithoutZero

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public double computeLikelihoodWithoutZero(XTrace trace) {
    double likelihood = 1;
    XEvent last = null;
    String lastName;
    double scaleFactor = 1 / trace.size();
    for(int i = 0; i < trace.size(); i++) {
        XEvent event = trace.get(i);
        if(last != null) {
            lastName = getEventName(last);
            String eventName = getEventName(event);
            likelihood += computeLikelihood(lastName, eventName) * scaleFactor;
        }
        last = event;
    }

    return likelihood;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:18,代码来源:EventDistributionCalculatorImpl.java


示例20: computeLikelihood

import org.deckfour.xes.model.XEvent; //导入依赖的package包/类
public double computeLikelihood(List<XEvent> trace) {
    double likelihood = 1;
    XEvent last = null;
    String lastName;
    for(int i = 0; i < trace.size(); i++) {
        XEvent event = trace.get(i);
        if(last != null) {
            lastName = getEventName(last);
            String eventName = getEventName(event);
            double tmp = computeLikelihoodAcceptZero(lastName, eventName);
            if(tmp == 0) {
                initiator = i-1;
                terminator = i;
                return 0;
            }
            likelihood *= tmp;
        }
        last = event;
    }

    return likelihood;
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:23,代码来源:EventDistributionCalculatorImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LineString类代码示例发布时间:2022-05-22
下一篇:
Java Constants类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap