本文整理了Java中de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Flag.isTrue()
方法的一些代码示例,展示了Flag.isTrue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flag.isTrue()
方法的具体详情如下:
包路径:de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Flag
类名称:Flag
方法名:isTrue
[英]Shorthand for isDefined() && getValue() == true
[中]isDefined()&&getValue()==true的简写形式
代码示例来源:origin: elki-project/elki
/**
* Get the variance statistics parameter.
*
* @param config Parameterization
*/
protected void getParameterVarstat(Parameterization config) {
Flag varF = new Flag(VARSTAT_ID);
varstat = config.grab(varF) && varF.isTrue();
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-clustering
/**
* Get the variance statistics parameter.
*
* @param config Parameterization
*/
protected void getParameterVarstat(Parameterization config) {
Flag varF = new Flag(VARSTAT_ID);
varstat = config.grab(varF) && varF.isTrue();
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(TreeMBRVisualization.Parameterizer.FILL_ID);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag dropfirstP = new Flag(KEEPFIRST_ID);
if(config.grab(dropfirstP)) {
keepfirst = dropfirstP.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag nofillF = new Flag(NOFILL_ID);
if(config.grab(nofillF)) {
nofill = nofillF.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-input
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag normF = new Flag(NORMALIZE_FLAG);
if(config.grab(normF)) {
normalize = normF.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag varF = new Flag(VARSTAT_ID);
if(config.grab(varF)) {
varstat = varF.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag normF = new Flag(NORMALIZE_FLAG);
if(config.grab(normF)) {
normalize = normF.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-batik-visualization
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(FILL_ID);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(FILL_ID);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag normF = new Flag(NORMALIZE_FLAG);
if(config.grab(normF)) {
normalize = normF.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag dropfirstP = new Flag(KEEPFIRST_ID);
if(config.grab(dropfirstP)) {
keepfirst = dropfirstP.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(TreeMBRVisualization.Parameterizer.FILL_ID) //
.setDefaultValue(Boolean.TRUE);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
PatternParameter commentP = new PatternParameter(CSVReaderFormat.Parameterizer.COMMENT_ID, "^\\s*#.*$");
if(config.grab(commentP)) {
comment = commentP.getValue();
}
Flag trimP = new Flag(TRIM_ID);
if(config.grab(trimP)) {
trimWhitespace = trimP.isTrue();
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-batik-visualization
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(FILL_ID);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, OutlierScalingFunction.class, true);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-input
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
PatternParameter commentP = new PatternParameter(CSVReaderFormat.Parameterizer.COMMENT_ID, "^\\s*#.*$");
if(config.grab(commentP)) {
comment = commentP.getValue();
}
Flag trimP = new Flag(TRIM_ID);
if(config.grab(trimP)) {
trimWhitespace = trimP.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag fillF = new Flag(FILL_ID);
if(config.grab(fillF)) {
fill = fillF.isTrue();
}
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class, OutlierLinearScaling.class);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<HierarchicalClusteringAlgorithm> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, HierarchicalClusteringAlgorithm.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
Flag hierarchicalF = new Flag(HIERARCHICAL_ID);
if(config.grab(hierarchicalF)) {
hierarchical = hierarchicalF.isTrue();
}
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
IntParameter kP = new IntParameter(K_ID) //
.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(kP)) {
k = kP.intValue();
}
Flag binaryF = new Flag(BINARY_ID);
if(config.grab(binaryF)) {
binary = binaryF.isTrue();
}
}
代码示例来源:origin: elki-project/elki
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Flag curvesF = new Flag(STYLE_CURVES_ID);
if(config.grab(curvesF)) {
curves = curvesF.isTrue();
}
IntParameter binsP = new IntParameter(HISTOGRAM_BINS_ID, DEFAULT_BINS) //
.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(binsP)) {
bins = binsP.intValue();
}
}
内容来源于网络,如有侵权,请联系作者删除!