本文整理了Java中de.lmu.ifi.dbs.elki.database.relation.Relation.getDataTypeInformation
方法的一些代码示例,展示了Relation.getDataTypeInformation
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relation.getDataTypeInformation
方法的具体详情如下:
包路径:de.lmu.ifi.dbs.elki.database.relation.Relation
类名称:Relation
方法名:getDataTypeInformation
[英]Get the data type of this representation
[中]获取此表示形式的数据类型
代码示例来源:origin: elki-project/elki
@Override
public SimpleTypeInformation<O> getDataTypeInformation() {
return inner.getDataTypeInformation();
}
代码示例来源:origin: elki-project/elki
/**
* Constructor.
*
* @param inner Inner relation
* @param projection Projection function
*/
public ProjectedView(Relation<? extends IN> inner, Projection<IN, OUT> projection) {
super();
this.inner = inner;
this.projection = projection;
projection.initialize(inner.getDataTypeInformation());
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-database
/**
* Constructor.
*
* @param inner Inner relation
* @param projection Projection function
*/
public ProjectedView(Relation<? extends IN> inner, Projection<IN, OUT> projection) {
super();
this.inner = inner;
this.projection = projection;
projection.initialize(inner.getDataTypeInformation());
}
代码示例来源:origin: elki-project/elki
/**
* Get the dimensionality of a database relation.
*
* @param relation relation
* @return Database dimensionality
*/
public static int dimensionality(Relation<? extends SpatialComparable> relation) {
final SimpleTypeInformation<? extends SpatialComparable> type = relation.getDataTypeInformation();
if(type instanceof FieldTypeInformation) {
return ((FieldTypeInformation) type).getDimensionality();
}
return -1;
}
代码示例来源:origin: elki-project/elki
/**
* Test for a visualizable index in the context's database.
*
* @param rel Vector relation
* @param tree Tree to visualize
* @return whether the tree is visualizable
*/
public static boolean canVisualize(Relation<?> rel, AbstractMTree<?, ?, ?, ?> tree) {
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return false;
}
return getLPNormP(tree) > 0;
}
代码示例来源:origin: elki-project/elki
@SuppressWarnings("unchecked")
@Override
public Result run(Database database) {
for(Relation<?> rel : database.getRelations()) {
if(TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
ScalesResult res = run((Relation<? extends NumberVector>) rel);
ResultUtil.addChildResult(rel, res);
}
}
return null;
}
代码示例来源:origin: elki-project/elki
@SuppressWarnings("unchecked")
@Override
public Result run(Database database) {
for(Relation<?> rel : database.getRelations()) {
if(TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
ScalesResult res = run((Relation<? extends NumberVector>) rel);
ResultUtil.addChildResult(rel, res);
}
}
return null;
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
@SuppressWarnings("unchecked")
@Override
public Result run(Database database) {
for(Relation<?> rel : database.getRelations()) {
if(TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
ScalesResult res = run((Relation<? extends NumberVector>) rel);
ResultUtil.addChildResult(rel, res);
}
}
return null;
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findNewSiblings(context, start, ClusterOrder.class, ScatterPlotProjector.class, (co, p) -> {
final Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
final VisualizationTask task = new VisualizationTask(this, NAME, co, rel) //
.level(VisualizationTask.LEVEL_DATA - 1).visibility(false) //
.with(UpdateFlag.ON_DATA);
context.addVis(co, task);
context.addVis(p, task);
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(final VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
final Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p, rel) //
.level(VisualizationTask.LEVEL_DATA + 1).visibility(false) //
.with(UpdateFlag.ON_STYLEPOLICY));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ParallelPlotProjector.class).forEach(p -> {
Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p, rel) //
.level(VisualizationTask.LEVEL_DATA + 1) //
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_STYLEPOLICY));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p, p.getRelation()) //
.level(VisualizationTask.LEVEL_DATA + 3) //
.with(UpdateFlag.ON_STYLEPOLICY));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
final Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, rel, p.getRelation()) //
.level(VisualizationTask.LEVEL_DATA + 1).visibility(false) //
.with(UpdateFlag.ON_DATA));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
Relation<?> r = p.getRelation();
if(UncertainObject.UNCERTAIN_OBJECT_FIELD.isAssignableFromType(r.getDataTypeInformation())) {
context.addVis(p, new VisualizationTask(this, NAME, p, r) //
.level(VisualizationTask.LEVEL_DATA) // .defaultVisibility(false);
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_SAMPLE).with(UpdateFlag.ON_STYLEPOLICY));
}
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
// Find a scatter plot visualizing uncertain objects:
Relation<?> r = p.getRelation();
if(!UncertainObject.UNCERTAIN_OBJECT_FIELD.isAssignableFromType(r.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p, r) //
.level(VisualizationTask.LEVEL_DATA) //
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_SAMPLE).with(UpdateFlag.ON_STYLEPOLICY));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
final Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p, rel) //
.level(VisualizationTask.LEVEL_DATA) //
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_SAMPLE).with(UpdateFlag.ON_STYLEPOLICY));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ParallelPlotProjector.class).forEach(p -> {
Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
final VisualizationTask task = new VisualizationTask(this, NAME, context.getSelectionResult(), rel) //
.level(VisualizationTask.LEVEL_DATA - 1) //
.with(UpdateFlag.ON_SELECTION);
context.addVis(context.getSelectionResult(), task);
context.addVis(p, task);
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
final VisualizationTask task = new VisualizationTask(this, NAME, context.getSelectionResult(), rel) //
.level(VisualizationTask.LEVEL_DATA - 2) //
.with(UpdateFlag.ON_SELECTION);
context.addVis(context.getSelectionResult(), task);
context.addVis(p, task);
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ParallelPlotProjector.class).forEach(p -> {
final Relation<?> rel = p.getRelation();
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return;
}
context.addVis(p, new VisualizationTask(this, NAME, p.getRelation(), p.getRelation()) //
.level(VisualizationTask.LEVEL_DATA) //
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_STYLEPOLICY).with(UpdateFlag.ON_SAMPLE));
});
}
代码示例来源:origin: elki-project/elki
@Override
public void processNewResult(VisualizerContext context, Object start) {
VisualizationTree.findVis(context, start).filter(ScatterPlotProjector.class).forEach(p -> {
context.getHierarchy().iterAncestorsSelf((Relation<?>) p.getRelation()).filter(Relation.class).forEach(r2 -> {
if(UncertainObject.UNCERTAIN_OBJECT_FIELD.isAssignableFromType(r2.getDataTypeInformation())) {
context.addVis(p, new VisualizationTask(this, NAME, p, r2) //
.level(VisualizationTask.LEVEL_DATA).visibility(false) //
.with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_SAMPLE).with(UpdateFlag.ON_STYLEPOLICY));
}
});
});
}
内容来源于网络,如有侵权,请联系作者删除!