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


Java DataTable.isTime方法代码示例

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


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

示例1: drawSimpleDateLegend

import com.rapidminer.datatable.DataTable; //导入方法依赖的package包/类
public void drawSimpleDateLegend(Graphics graphics, int x, int y, DataTable table, int legendColumn, double min,
		double max) {
	String minColorString = null;
	String maxColorString = null;
	if (table.isDate(legendColumn)) {
		minColorString = Tools.createDateAndFormat(min);
		maxColorString = Tools.createDateAndFormat(max);
	} else if (table.isTime(legendColumn)) {
		minColorString = Tools.createTimeAndFormat(min);
		maxColorString = Tools.createTimeAndFormat(max);
	} else if (table.isDateTime(legendColumn)) {
		minColorString = Tools.createDateTimeAndFormat(min);
		maxColorString = Tools.createDateTimeAndFormat(max);
	} else {
		minColorString = Tools.formatNumber(min);
		maxColorString = Tools.formatNumber(max);
	}

	drawSimpleNumericalLegend(graphics, x, y, table.getColumnName(legendColumn), minColorString, maxColorString);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:PlotterAdapter.java

示例2: addPoint

import com.rapidminer.datatable.DataTable; //导入方法依赖的package包/类
private void addPoint(DataTable dataTable, Map<String, List<double[]>> dataCollection, double x, double y, double z,
		double color) {
	List<double[]> dataList = null;
	if (Double.isNaN(color)) {
		dataList = dataCollection.get("All");
		if (dataList == null) {
			dataList = new LinkedList<>();
			dataCollection.put("All", dataList);
		}
	} else {
		String name = color + "";
		if (dataTable.isNominal(colorColumn)) {
			name = dataTable.mapIndex(colorColumn, (int) color);
		} else if (dataTable.isDate(colorColumn)) {
			name = Tools.createDateAndFormat(color);
		} else if (dataTable.isTime(colorColumn)) {
			name = Tools.createTimeAndFormat(color);
		} else if (dataTable.isDateTime(colorColumn)) {
			name = Tools.createDateTimeAndFormat(color);
		}
		dataList = dataCollection.get(name);
		if (dataList == null) {
			dataList = new LinkedList<>();
			dataCollection.put(name, dataList);
		}
	}

	this.bubbleSizeMin = MathFunctions.robustMin(this.bubbleSizeMin, z);
	this.bubbleSizeMax = MathFunctions.robustMax(this.bubbleSizeMax, z);
	this.xAxisMin = MathFunctions.robustMin(this.xAxisMin, x);
	this.yAxisMin = MathFunctions.robustMin(this.yAxisMin, y);
	this.xAxisMax = MathFunctions.robustMax(this.xAxisMax, x);
	this.yAxisMax = MathFunctions.robustMax(this.yAxisMax, y);
	this.minColor = MathFunctions.robustMin(this.minColor, color);
	this.maxColor = MathFunctions.robustMax(this.maxColor, color);

	dataList.add(new double[] { x, y, z });
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:39,代码来源:BubbleChartPlotter.java

示例3: drawLegend

import com.rapidminer.datatable.DataTable; //导入方法依赖的package包/类
/** This method can be used to draw a legend on the given graphics context. */
protected void drawLegend(Graphics graphics, DataTable table, int legendColumn, int xOffset, int alpha) {
	if (legendColumn < 0 || legendColumn > table.getNumberOfColumns() - 1) {
		return;
	}
	if (table.isNominal(legendColumn)) {
		String maxNominalValuesString = ParameterService
				.getParameterValue(MainFrame.PROPERTY_RAPIDMINER_GUI_PLOTTER_LEGEND_CLASSLIMIT);
		int maxNumberOfNominalValues = 10;
		try {
			if (maxNominalValuesString != null) {
				maxNumberOfNominalValues = Integer.parseInt(maxNominalValuesString);
			}
		} catch (NumberFormatException e) {
			// LogService.getGlobal().logWarning("Plotter: cannot parse maximal number of nominal values for legend ("
			// + maxNominalValuesString +
			// ")! Using 10...");
			LogService.getRoot().log(Level.WARNING,
					"com.rapidminer.gui.plotter.PlotterAdapter.parsing_maximal_number_of_nominal_values_error",
					maxNominalValuesString);
		}
		if (maxNumberOfNominalValues == -1 || table.getNumberOfValues(legendColumn) <= maxNumberOfNominalValues) {
			drawNominalLegend(graphics, table, legendColumn, xOffset, alpha);
		} else {
			// LogService.getGlobal().logWarning("Plotter: cannot draw nominal legend since number of different values is too high (more than "
			// +
			// maxNominalValuesString + ")! Using numerical legend instead.");
			LogService.getRoot().log(Level.WARNING,
					"com.rapidminer.gui.plotter.PlotterAdapter.drawing_nominal_legend_error", maxNominalValuesString);
			drawNumericalLegend(graphics, table, legendColumn, alpha);
		}
	} else if (table.isDate(legendColumn) || table.isTime(legendColumn) || table.isDateTime(legendColumn)) {
		drawDateLegend(graphics, table, legendColumn, alpha);
	} else {
		drawNumericalLegend(graphics, table, legendColumn, alpha);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:38,代码来源:PlotterAdapter.java

示例4: drawDateLegend

import com.rapidminer.datatable.DataTable; //导入方法依赖的package包/类
private void drawDateLegend(Graphics graphics, DataTable table, int legendColumn, int alpha) {
	double min = Double.POSITIVE_INFINITY;
	double max = Double.NEGATIVE_INFINITY;
	synchronized (table) {
		Iterator<DataTableRow> i = table.iterator();
		while (i.hasNext()) {
			DataTableRow row = i.next();
			double colorValue = row.getValue(legendColumn);
			min = MathFunctions.robustMin(min, colorValue);
			max = MathFunctions.robustMax(max, colorValue);
		}
	}
	String minColorString = null;
	String maxColorString = null;
	if (table.isDate(legendColumn)) {
		minColorString = Tools.createDateAndFormat(min);
		maxColorString = Tools.createDateAndFormat(max);
	} else if (table.isTime(legendColumn)) {
		minColorString = Tools.createTimeAndFormat(min);
		maxColorString = Tools.createTimeAndFormat(max);
	} else if (table.isDateTime(legendColumn)) {
		minColorString = Tools.createDateTimeAndFormat(min);
		maxColorString = Tools.createDateTimeAndFormat(max);
	} else {
		minColorString = Tools.formatNumber(min);
		maxColorString = Tools.formatNumber(max);
	}

	drawNumericalLegend(graphics, getWidth(), minColorString, maxColorString, table.getColumnName(legendColumn), alpha);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:31,代码来源:PlotterAdapter.java


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