public code v1

This commit is contained in:
2026-05-22 11:14:29 +02:00
parent 427197ec5a
commit b8141736eb
28859 changed files with 575079 additions and 0 deletions
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
@@ -0,0 +1 @@
/bin/
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>afryca.domain.fuzzyset</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.domain.fuzzyset;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: afryca.domain;bundle-version="1.0.0";visibility:=reexport,
afryca.domain.real;bundle-version="1.0.0";visibility:=reexport
Export-Package: afryca.domain.fuzzyset,
afryca.domain.fuzzyset.function,
afryca.domain.fuzzyset.function.types,
afryca.domain.fuzzyset.labelset,
afryca.domain.fuzzyset.semantic
Import-Package: afryca.structure
Automatic-Module-Name: afryca.domain.fuzzyset
@@ -0,0 +1,4 @@
#Properties file for afryca.domain.fuzzyset
Bundle-Name = Fuzzyset
fuzzyset_name = Fuzzyset
fuzzyset_type = linguistic
@@ -0,0 +1,4 @@
#Properties file for afryca.domain.fuzzyset
Bundle-Name = Fuzzyset
fuzzyset_name = Lingüístico
fuzzyset_type = lingüístico
@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="afryca.domain.domain">
<domain
id="afryca.domain.fuzzyset"
implementation="afryca.domain.fuzzyset.FuzzySet"
name="%fuzzyset_name"
type="%fuzzyset_type">
</domain>
</extension>
</plugin>
@@ -0,0 +1,626 @@
package afryca.domain.fuzzyset;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import afryca.domain.Domain;
import afryca.domain.fuzzyset.function.FragmentFunction;
import afryca.domain.fuzzyset.function.IFragmentFunction;
import afryca.domain.fuzzyset.function.types.LinearPieceFunction;
import afryca.domain.fuzzyset.function.types.TrapezoidalFunction;
import afryca.domain.fuzzyset.labelset.Label;
import afryca.domain.fuzzyset.labelset.LabelSet;
import afryca.domain.fuzzyset.semantic.IMembershipFunction;
import afryca.domain.real.NumericRealDomain;
import afryca.valueforcer.ValueForcer;
public class FuzzySet extends Domain {
public static final String ID = "afryca.domain.fuzzyset"; //$NON-NLS-1$
protected LabelSet labelSet;
protected List<Double> values;
protected boolean isUnification;
public FuzzySet() {
super();
labelSet = new LabelSet();
values = new LinkedList<Double>();
isUnification = false;
setType(ID);
}
public FuzzySet(List<Label> labels) {
this();
isUnification = false;
labelSet.setLabels(labels);
addValues(labels);
}
public void setIsUnification(boolean isUnification) {
this.isUnification = isUnification;
}
public boolean isUnification() {
return isUnification;
}
public void clearFuzzySet() {
labelSet = new LabelSet();
values = new LinkedList<Double>();
}
public void setValues(List<Double> values) {
ValueForcer.notNull(values);
int cardinality = labelSet.getCardinality();
ValueForcer.notInvalidSizeArray(values.size(), cardinality, cardinality);
for (Double value : values) {
ValueForcer.notNull(value);
ValueForcer.inRange(value, 0.0, 1.0); // $NON-NLS-1$
}
this.values = values;
}
public void setValue(int pos, Double value) {
ValueForcer.notEmpty(labelSet.getLabels().toArray());
ValueForcer.inRange(pos, 0, labelSet.getCardinality() - 1);
ValueForcer.notNull(value);
ValueForcer.inRange(value, 0.0, 1.0); // $NON-NLS-1$
values.set(pos, value);
}
public void setValue(String name, Double value) {
ValueForcer.notNull(name);
ValueForcer.notNull(value);
ValueForcer.inRange(value, 0.0, 1.0); // $NON-NLS-1$
int pos = labelSet.getPos(name);
if (pos != -1) {
setValue(pos, value);
} else {
throw new IllegalArgumentException("Inexistent element");
}
}
public void setValue(Label label, Double value) {
ValueForcer.notNull(label);
ValueForcer.notNegative(value);
ValueForcer.inRange(value, 0.0, 1.0); // $NON-NLS-1$
int pos = labelSet.getPos(label);
if (pos != -1) {
setValue(pos, value);
} else {
throw new IllegalArgumentException("Inexistent_element");
}
}
public Double getValue(int pos) {
ValueForcer.notEmpty(labelSet.getLabels().toArray());
ValueForcer.inRange(pos, 0, labelSet.getCardinality() - 1);
return values.get(pos);
}
public Integer getIndex(String name) {
int pos = labelSet.getPos(name);
if (pos != -1) {
return (((labelSet.getCardinality() / 2) + 1) + pos) - labelSet.getCardinality();
} else {
return null;
}
}
public Double getValue(String name) {
int pos = labelSet.getPos(name);
if (pos != -1) {
return getValue(pos);
} else {
return null;
}
}
public Double getValue(Label label) {
int pos = labelSet.getPos(label);
if (pos != -1) {
return getValue(pos);
} else {
return null;
}
}
public List<Double> getValues() {
return values;
}
public void setLabelSet(LabelSet labelSet) {
this.labelSet = labelSet;
}
public LabelSet getLabelSet() {
return labelSet;
}
public void addLabel(Label label) {
int labels = labelSet.getCardinality();
if (labels == 0) {
addLabel(labels, label);
} else {
boolean lower = false;
int counter = 0;
do {
if (label.compareTo(labelSet.getLabels().get(counter)) <= 0) {
lower = true;
} else {
counter++;
}
} while ((!lower) && (counter < labels));
if (lower) {
addLabel(counter, label);
} else {
addLabel(labels, label);
}
}
}
public void addLabel(Label label, Double value) {
addLabel(labelSet.getCardinality(), label, value);
}
public void addLabel(int pos, Label label) {
labelSet.addLabel(pos, label);
values.add(pos, 0d);
}
public void addLabel(int pos, Label label, Double value) {
labelSet.addLabel(pos, label);
ValueForcer.notNull(value);
ValueForcer.inRange(value, 0.0, 1.0); // $NON-NLS-1$
values.add(pos, value);
}
public void removeLabel(int pos) {
ValueForcer.notEmpty(labelSet.getLabels().toArray());
ValueForcer.inRange(pos, 0, labelSet.getCardinality() - 1);
labelSet.getLabels().remove(pos);
values.remove(pos);
}
public void removeLabel(String name) {
if (name == null) {
return;
}
int pos = labelSet.getPos(name);
if (pos != -1) {
removeLabel(pos);
}
}
public void removeLabel(Label label) {
if (label == null) {
return;
}
int pos = labelSet.getPos(label);
if (pos != -1) {
removeLabel(pos);
}
}
public void addValues(List<Label> labels) {
List<Double> values = new LinkedList<Double>();
for (int element = 0; element < labels.size(); ++element) {
values.add(0d);
}
this.values = values;
}
public void createTrapezoidalFunction(String[] labels) {
Label currentLabel;
IMembershipFunction semantic;
clearFuzzySet();
if (labels.length == 1) {
semantic = new TrapezoidalFunction(new double[] { 0, 0, 1, 1 });
currentLabel = new Label(labels[0], semantic);
addLabel(currentLabel);
} else {
int numLabels = labels.length;
double lower, central, upper, increment = 1d / (numLabels - 1), factor = 1e5;
for (int i = 0; i < numLabels; ++i) {
lower = (i == 0) ? 0 : increment * (i - 1);
central = increment * i;
upper = (i == (numLabels - 1)) ? 1 : increment * (i + 1);
lower = Math.round(lower * factor) / factor;
central = Math.round(central * factor) / factor;
upper = Math.round(upper * factor) / factor;
semantic = new TrapezoidalFunction(new double[] { lower, central, upper });
currentLabel = new Label(labels[i], semantic);
addLabel(currentLabel);
}
}
}
public double chi() {
double result, valuesSum, sum;
int pos;
if (labelSet.getCardinality() == 0) {
return 0;
}
sum = valuesSum = pos = 0;
for (Double value : values) {
sum += value * pos++;
valuesSum += value;
}
result = sum / valuesSum;
return result;
}
public boolean isFuzzy() {
int cardinality = labelSet.getCardinality();
if (cardinality == 0) {
return false;
}
FragmentFunction fragmentFunction = new FragmentFunction();
FragmentFunction semantic;
Map<NumericRealDomain, IFragmentFunction> pieces;
for (Label label : labelSet.getLabels()) {
semantic = label.getSemantic().toFragmentFunction();
pieces = semantic.getPieces();
for (NumericRealDomain domain : pieces.keySet()) {
fragmentFunction.addPiece(domain, pieces.get(domain));
fragmentFunction.simplify();
}
}
pieces = fragmentFunction.getPieces();
if (pieces.size() == 1) {
Object[] values = pieces.values().toArray();
LinearPieceFunction piece = (LinearPieceFunction) values[0];
if (piece != null) {
if ((piece.getSlope() == 0) && (piece.getCutOffY() == 1)) {
return true;
}
}
}
return false;
}
public boolean isOdd() {
return (labelSet.getCardinality() % 2 != 0);
}
public boolean isTriangular() {
if (labelSet.getCardinality() == 0) {
return false;
}
IMembershipFunction semantic;
for (Label label : labelSet.getLabels()) {
semantic = label.getSemantic();
if (semantic instanceof TrapezoidalFunction) {
if (!((TrapezoidalFunction) semantic).isTriangular()) {
return false;
}
} else {
return false;
}
}
return true;
}
public boolean isTOR() {
if (isFuzzy()) {
if (isOdd()) {
return isTriangular();
}
}
return false;
}
public boolean isSymmetrical() {
if (labelSet.getCardinality() == 0) {
return false;
}
double midPoint = midpoint();
if (midPoint != -1) {
Label label1, label2;
int centralPos = labelSet.getCardinality() / 2;
for (int i = 0; i < centralPos; ++i) {
label1 = labelSet.getLabels().get(i);
label2 = labelSet.getLabels().get((labelSet.getCardinality() - 1) - i);
if (!(label1.getSemantic().isSymmetrical(label2.getSemantic(), midPoint))) {
return false;
}
}
return true;
} else {
return false;
}
}
@Override
public double midpoint() {
Label label1, label2;
int centralPos = labelSet.getCardinality() / 2;
double midPoint;
if (isOdd()) {
label1 = labelSet.getLabels().get(centralPos);
IMembershipFunction semantic = label1.getSemantic();
if (!semantic.isSymmetrical()) {
return -1;
} else {
midPoint = semantic.centroid();
}
} else {
label1 = labelSet.getLabels().get(centralPos - 1);
label2 = labelSet.getLabels().get(centralPos);
midPoint = (label2.getSemantic().centroid() + label1.getSemantic().centroid()) / 2d;
}
return midPoint;
}
public boolean isUniform() {
int cardinality = labelSet.getCardinality();
if (cardinality <= 1) {
return true;
}
Label label1 = labelSet.getLabels().get(0);
Label label2 = labelSet.getLabels().get(1);
double center1 = label1.getSemantic().getCenter().midpoint();
double center2 = label2.getSemantic().getCenter().midpoint();
double distance = center2 - center1;
double error = (1 / Math.pow(10, Double.toString(distance).length() - 2)) * 1.5;
double distanceLower = distance - error;
double distanceUpper = distance + error;
for (int i = 2; i < cardinality; ++i) {
label1 = (Label) label2.clone();
label2 = labelSet.getLabels().get(i);
center1 = center2;
center2 = label2.getSemantic().getCenter().midpoint();
distance = center2 - center1;
if (!((distanceLower <= distance) && (distance <= distanceUpper))) {
return false;
}
}
return true;
}
public boolean isBLTS() {
if (isTOR()) {
if (isSymmetrical()) {
return isUniform();
}
}
return false;
}
@Override
public void parse(String readableDomain) {
generateId(readableDomain);
readableDomain = readableDomain.substring(readableDomain.indexOf(";") + 1);
readableDomain = readableDomain.replace("[", "");
readableDomain = readableDomain.replace("]", "");
generateLabelSet(readableDomain);
}
private void generateId(String readableDomain) {
String id = readableDomain.substring(0, readableDomain.indexOf(";"));
setId(id);
}
private void generateLabelSet(String readableDomain) {
String[] labels = readableDomain.split("separator");
for (String label : labels) {
generateLabel(label);
}
}
private void generateLabel(String label) {
String[] info = label.split(";");
String name = getLabelName(info);
TrapezoidalFunction function = generateTrapezoidalFunction(info);
Label labelDomain = new Label(name, function);
labelSet.addLabel(labelDomain);
values.add(getValue(info));
}
private String getLabelName(String[] info) {
return info[0];
}
private TrapezoidalFunction generateTrapezoidalFunction(String[] info) {
String trapezoidal = info[1];
trapezoidal = trapezoidal.replace("Trapezoidal(", "");
trapezoidal = trapezoidal.replace(")", "");
String[] points = trapezoidal.split(",");
double[] limits = new double[points.length];
for (int i = 0; i < limits.length; ++i) {
limits[i] = Double.parseDouble(points[i]);
}
return new TrapezoidalFunction(limits);
}
private Double getValue(String[] info) {
return Double.parseDouble(info[2]);
}
@Override
public String formatDescriptionDomain() {
String result = ""; //$NON-NLS-1$
int cardinality;
if ((cardinality = labelSet.getCardinality()) != 0) {
result += "("; //$NON-NLS-1$
for (int i = 0; i < cardinality - 1; ++i) {
result += labelSet.getLabels().get(i).getName() + ", "; //$NON-NLS-1$
}
result += labelSet.getLabels().get(cardinality - 1).getName() + ")"; //$NON-NLS-1$
}
return result.toString();
}
@Override
public String toString() {
String result = ""; //$NON-NLS-1$
int cardinality = labelSet.getCardinality();
if (cardinality > 0) {
for (int i = 0; i < cardinality; ++i) {
if (i > 0) {
result += ", "; //$NON-NLS-1$
}
result += "[" + labelSet.getLabels().get(i).toString() + ";" + values.get(i) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
return "{" + result + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public String toStringFile() {
String result = ""; //$NON-NLS-1$
int cardinality = labelSet.getCardinality();
result += ID + ";" + getId() + ";";
result = result.replace("class ", "");
if (cardinality > 0) {
for (int i = 0; i < cardinality; ++i) {
if (i > 0) {
result += "separator"; //$NON-NLS-1$
}
result += "[" + labelSet.getLabels().get(i).toStringFile() + ";" + values.get(i) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
return result; // $NON-NLS-1$ //$NON-NLS-2$
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((labelSet == null) ? 0 : labelSet.hashCode());
result = prime * result + ((values == null) ? 0 : Arrays.deepHashCode(values.toArray()));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (!super.equals(obj))
return false;
FuzzySet other = (FuzzySet) obj;
if (labelSet == null) {
if (other.labelSet != null)
return false;
} else if (!labelSet.equals(other.labelSet))
return false;
if (values == null) {
if (other.values != null)
return false;
} else if (!values.equals(other.values))
return false;
return true;
}
@Override
public Object clone() {
Object result;
result = super.clone();
List<Double> values = new LinkedList<Double>();
for (Double value : this.values) {
values.add(Double.valueOf(value));
}
((FuzzySet) result).values = values;
((FuzzySet) result).labelSet = (LabelSet) labelSet.clone();
return result;
}
public boolean belongtoFuzzySet(TrapezoidalFunction function){
for (Label l:labelSet.getLabels()) {
if(l.getSemantic().compareTo(function) == 0) {
return true;
}
}
return false;
}
@Override
public Object createDataRandom() {
Double random = Math.random() * labelSet.getCardinality();
return labelSet.getLabel(random.intValue());
}
}
@@ -0,0 +1,217 @@
package afryca.domain.fuzzyset.function;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import afryca.domain.fuzzyset.function.types.LinearPieceFunction;
import afryca.domain.real.NumericRealDomain;
import afryca.valueforcer.ValueForcer;
public class FragmentFunction {
Map<NumericRealDomain, IFragmentFunction> _pieces;
public FragmentFunction() {
_pieces = new HashMap<NumericRealDomain, IFragmentFunction>();
}
public Map<NumericRealDomain, IFragmentFunction> getPieces() {
return _pieces;
}
public void addPiece(NumericRealDomain domain, IFragmentFunction piece) {
ValueForcer.notNull(domain);
ValueForcer.notNull(piece);
double otherMin = domain.getMin();
double otherMax = domain.getMax();
if(otherMin == otherMax) {
return;
}
double currentMin, currentMax;
NumericRealDomain lower, central, upper;
IFragmentFunction currentPiece;
Set<NumericRealDomain> domains = _pieces.keySet();
for(NumericRealDomain currentDomain: domains) {
currentMin = currentDomain.getMin();
currentMax = currentDomain.getMax();
currentPiece = _pieces.get(currentDomain);
switch(Double.compare(currentMin, otherMin)) {
case -1:
if(currentMax > otherMin) {
switch(Double.compare(currentMax, otherMax)) {
case -1:
lower = new NumericRealDomain();
lower.setMinMax(currentMin, otherMin);
central = new NumericRealDomain();
central.setMinMax(otherMin, currentMax);
upper = new NumericRealDomain();
upper.setMinMax(currentMax, otherMax);
_pieces.remove(currentDomain);
_pieces.put(lower, currentPiece);
_pieces.put(central, piece.sumFunctions(currentPiece));
addPiece(upper, piece);
break;
case 0:
lower = new NumericRealDomain();
lower.setMinMax(currentMin, otherMin);
upper = new NumericRealDomain();
upper.setMinMax(otherMin, otherMax);
_pieces.remove(currentDomain);
_pieces.put(lower, currentPiece);
_pieces.put(upper, piece.sumFunctions(currentPiece));
break;
case 1:
lower = new NumericRealDomain();
lower.setMinMax(currentMin, otherMin);
central = new NumericRealDomain();
central.setMinMax(otherMin, otherMax);
upper = new NumericRealDomain();
upper.setMinMax(otherMax, currentMax);
_pieces.remove(currentDomain);
_pieces.put(lower, currentPiece);
_pieces.put(central, piece.sumFunctions(currentPiece));
_pieces.put(upper, currentPiece);
break;
}
return;
}
break;
case 0:
switch(Double.compare(currentMax, otherMax)) {
case -1:
lower = new NumericRealDomain();
lower.setMinMax(otherMin, currentMax);
upper = new NumericRealDomain();
upper.setMinMax(currentMax, otherMax);
_pieces.remove(currentDomain);
_pieces.put(lower, piece.sumFunctions(currentPiece));
addPiece(upper, piece);
break;
case 0:
_pieces.remove(currentDomain);
_pieces.put(domain, piece.sumFunctions(currentPiece));
break;
case 1:
lower = new NumericRealDomain();
lower.setMinMax(currentMin, otherMax);
upper = new NumericRealDomain();
upper.setMinMax(otherMax, currentMax);
_pieces.remove(currentDomain);
_pieces.put(lower, piece.sumFunctions(currentPiece));
_pieces.put(upper, currentPiece);
break;
}
return;
case 1:
if(otherMax > currentMin) {
switch(Double.compare(otherMax, currentMax)) {
case -1:
lower = new NumericRealDomain();
lower.setMinMax(otherMin, currentMin);
central = new NumericRealDomain();
central.setMinMax(currentMin, otherMax);
upper = new NumericRealDomain();
upper.setMinMax(otherMax, currentMax);
_pieces.remove(currentDomain);
_pieces.put(central, piece.sumFunctions(currentPiece));
_pieces.put(upper, currentPiece);
addPiece(lower, piece);
break;
case 0:
lower = new NumericRealDomain();
lower.setMinMax(otherMin, currentMin);
upper = new NumericRealDomain();
upper.setMinMax(currentMin, otherMax);
_pieces.remove(currentDomain);
_pieces.put(upper, piece.sumFunctions(currentPiece));
addPiece(lower, piece);
break;
case 1:
lower = new NumericRealDomain();
lower.setMinMax(otherMin, currentMin);
central = new NumericRealDomain();
central.setMinMax(currentMin, currentMax);
upper = new NumericRealDomain();
upper.setMinMax(currentMax, otherMax);
_pieces.remove(currentDomain);
_pieces.put(central, piece.sumFunctions(currentPiece));
addPiece(lower, piece);
addPiece(upper, piece);
break;
}
return;
}
break;
}
}
_pieces.put(domain, piece);
}
public void simplify() {
Map<NumericRealDomain, IFragmentFunction> simplifyPieces = new HashMap<NumericRealDomain, IFragmentFunction>();
LinearPieceFunction piece1, piece2;
NumericRealDomain domain;
for(NumericRealDomain domain1: _pieces.keySet()) {
piece1 = (LinearPieceFunction) _pieces.get(domain1);
for(NumericRealDomain domain2: simplifyPieces.keySet()) {
piece2 = (LinearPieceFunction) simplifyPieces.get(domain2);
if(domain1.getMin() == domain2.getMax()) {
if(piece1.equals(piece2)) {
domain = new NumericRealDomain();
domain.setMinMax(domain2.getMin(), domain1.getMax());
_pieces.remove(domain1);
_pieces.remove(domain2);
_pieces.put(domain, piece1);
simplify();
return;
}
} else if(domain1.getMax() == domain2.getMin()) {
if(piece1.equals(piece2)) {
domain = new NumericRealDomain();
domain.setMinMax(domain1.getMin(), domain2.getMax());
_pieces.remove(domain1);
_pieces.remove(domain2);
_pieces.put(domain, piece1);
simplify();
return;
}
}
}
simplifyPieces.put(domain1, piece1);
}
_pieces = simplifyPieces;
}
}
@@ -0,0 +1,8 @@
package afryca.domain.fuzzyset.function;
public interface IFragmentFunction {
public IFragmentFunction sumFunctions(IFragmentFunction other);
}
@@ -0,0 +1,57 @@
package afryca.domain.fuzzyset.function.types;
import afryca.domain.fuzzyset.function.IFragmentFunction;
import afryca.valueforcer.ValueForcer;
public class LinearPieceFunction implements IFragmentFunction {
private final static double EPSILON = 0.00001;
private double slope;
private double cutOffY;
public LinearPieceFunction(Double slope, Double cutOffY) {
this.slope = slope;
this.cutOffY = cutOffY;
}
public double getSlope() {
return slope;
}
public double getCutOffY() {
return cutOffY;
}
@Override
public IFragmentFunction sumFunctions(IFragmentFunction other) {
ValueForcer.notNull(other);
return new LinearPieceFunction(slope + ((LinearPieceFunction) other).slope,
cutOffY + ((LinearPieceFunction) other).cutOffY);
}
@Override
public String toString() {
return (cutOffY < 0) ? (slope + "x " + cutOffY) : (slope + "x + " + cutOffY); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final LinearPieceFunction other = (LinearPieceFunction) obj;
if(Math.abs(slope - other.slope) < EPSILON) {
if(Math.abs(cutOffY - other.cutOffY) < EPSILON) {
return true;
}
}
return false;
}
}
@@ -0,0 +1,499 @@
package afryca.domain.fuzzyset.function.types;
import java.math.BigDecimal;
import java.math.RoundingMode;
import afryca.domain.fuzzyset.FuzzySet;
import afryca.domain.fuzzyset.function.FragmentFunction;
import afryca.domain.fuzzyset.semantic.IMembershipFunction;
import afryca.domain.real.NumericRealDomain;
import afryca.valueforcer.ValueForcer;
public class TrapezoidalFunction implements IMembershipFunction {
private final static double EPSILON = 0.000001;
private Double a;
private Double b;
private Double c;
private Double d;
public TrapezoidalFunction() {
a = b = c = d = 0d;
}
public TrapezoidalFunction(double a, double b, double c, double d) {
setA(a);
setB(b);
setC(c);
setD(d);
}
public double[] getLimits() {
double limits[] = new double[4];
limits[0] = a;
limits[1] = b;
limits[2] = c;
limits[3] = d;
return limits;
}
public void setLimits(double[] limits) {
ValueForcer.notNull(limits);
ValueForcer.notInvalidSizeArray(limits.length, 3, 4);
for (double limit : limits)
ValueForcer.notNegative(limit);
if (limits.length == 3) {
this.a = limits[0];
this.b = this.c = limits[1];
this.d = limits[2];
} else if (limits.length == 4) {
this.a = limits[0];
this.b = limits[1];
this.c = limits[2];
this.d = limits[3];
}
}
public Double getA() {
return a;
}
public void setA(Double a) {
this.a = a;
}
public Double getB() {
return b;
}
public void setB(Double b) {
this.b = b;
}
public Double getC() {
return c;
}
public void setC(Double c) {
this.c = c;
}
public Double getD() {
return d;
}
public void setD(Double d) {
this.d = d;
}
public TrapezoidalFunction(double[] limits) {
this();
ValueForcer.notNull(limits);
ValueForcer.notInvalidSizeArray(limits.length, 3, 4);
for(double limit: limits) {
ValueForcer.notNegative(limit);
}
if(limits.length == 3) {
a = limits[0];
b = c = limits[1];
d = limits[2];
} else if(limits.length == 4) {
a = limits[0];
b = limits[1];
c = limits[2];
d = limits[3];
}
}
@Override
public FragmentFunction toFragmentFunction() {
FragmentFunction result = new FragmentFunction();
LinearPieceFunction piece;
NumericRealDomain domain;
double slope, cutoffY;
if(a != b) {
slope = 1d / (b - a);
cutoffY = -(slope * a);
piece = new LinearPieceFunction(slope, cutoffY);
domain = new NumericRealDomain();
domain.setMinMax(a, b);
result.addPiece(domain, piece);
}
if(b != c) {
slope = 0;
cutoffY = 1;
piece = new LinearPieceFunction(slope, cutoffY);
domain = new NumericRealDomain();
domain.setMinMax(b, c);
result.addPiece(domain, piece);
}
if(c != d) {
slope = 1d / (c - d);
cutoffY = -(slope * d);
piece = new LinearPieceFunction(slope, cutoffY);
domain = new NumericRealDomain();
domain.setMinMax(c, d);
result.addPiece(domain, piece);
}
return result;
}
@Override
public boolean isSymmetrical() {
if(Math.abs((b - a) - (d - c)) < EPSILON){
return true;
} else {
return false;
}
}
@Override
public boolean isSymmetrical(IMembershipFunction other, double center) {
double displacement = (center - d) * 2;
TrapezoidalFunction clone = (TrapezoidalFunction) clone();
clone.a = d;
clone.b = clone.a + (d - c);
clone.c = clone.b + (c - b);
clone.d = clone.c + (b - a);
clone.a += displacement;
clone.b += displacement;
clone.c += displacement;
clone.d += displacement;
return clone.equals(other);
}
@Override
public NumericRealDomain getCenter() {
NumericRealDomain result = new NumericRealDomain();
result.setMinMax(b, c);
return result;
}
@Override
public NumericRealDomain getCoverage() {
NumericRealDomain result = new NumericRealDomain();
result.setMinMax(a, d);
return result;
}
@Override
public double getMembershipValue(double x) {
double result;
if(x >= b && x <= c) {
result = 1d;
} else if(x <= a || x >= d) {
result = 0d;
} else if(x < b) {
result = (x - a) / (b - a);
} else {
result = (x - d) / (c - d);
}
return result;
}
public boolean isTriangular() {
return (Double.compare(b, c) == 0);
}
@Override
public double centroid() {
double centroidLeft, centroidCenter, centroidRight, areaLeft, areaCenter, areaRight,
areaSum, result;
centroidLeft = (a + ( 2 * b)) / 3.;
centroidCenter = (b + c) / 2.;
centroidRight = ((2 * c) + d) / 3.;
areaLeft = (b - a) / 2.;
areaCenter = (c - b);
areaRight = (d - c) / 2.;
areaSum = areaLeft + areaCenter + areaRight;
result = ((centroidLeft * areaLeft) + (centroidCenter * areaCenter) + (centroidRight * areaRight)) / areaSum;
return result;
}
@Override
public double maxMin(double max, double min) {
ValueForcer.notGreaterThan(min, max);
if(( min >= b) && (max <= c)) {
return 1d;
} else if(max < b) {
return getMembershipValue(max);
} else {
return getMembershipValue(min);
}
}
@Override
public double maxMin(IMembershipFunction function, FuzzySet blts, FuzzySet domainValuation) {
TrapezoidalFunction tmf = null;
ValueForcer.notNull(function);
if (function instanceof TrapezoidalFunction) {
tmf = (TrapezoidalFunction) function;
}
if(blts.equals(domainValuation)){
if(tmf.equals(this)){
return 1;
}else if(blts.belongtoFuzzySet(tmf)){
return 0;
}
}
double values[] = new double[5];
double result;
double slopeThisAB, slopeFunctionAB, slopeThisCD, slopeFunctionCD;
values[0] = maxMin(tmf.c, tmf.b);
if (Double.compare(values[0],1d)==0) {
return 1d;
}
if (Double.compare(b, a)==0) {
values[1] = values[2] = tmf.getMembershipValue(a);
} else {
slopeThisAB = 1d / (b - a);
if (Double.compare(tmf.a,tmf.b)==0) {
values[1] = getMembershipValue(tmf.a);
} else {
slopeFunctionAB = 1d / (tmf.b - tmf.a);
if (Double.compare(slopeThisAB,slopeFunctionAB)==0) {
values[1] = 0d;
} else {
values[1] = slopeFunctionAB * slopeThisAB * (a - tmf.a) / (slopeThisAB - slopeFunctionAB);
}
}
if (Double.compare(tmf.c,tmf.d)==0) {
values[2] = getMembershipValue(tmf.c);
} else {
slopeFunctionCD = 1d / (tmf.c - tmf.d);
values[2] = slopeFunctionCD * slopeThisAB * (a - tmf.d) / (slopeThisAB - slopeFunctionCD);
}
}
if (Double.compare(c,d)==0) {
values[3] = values[4] = tmf.getMembershipValue(c);
} else {
slopeThisCD = 1d / (c - d);
if (Double.compare(tmf.a,tmf.b)==0) {
values[3] = getMembershipValue(tmf.a);
} else {
slopeFunctionAB = 1d / (tmf.b - tmf.a);
values[3] = slopeFunctionAB * slopeThisCD * (d - tmf.a) / (slopeThisCD - slopeFunctionAB);
}
if (Double.compare(tmf.c,tmf.d)==0) {
values[4] = getMembershipValue(tmf.c);
} else {
slopeFunctionCD = 1d / (tmf.c - tmf.d);
if (Double.compare(slopeThisCD,slopeFunctionCD)==0) {
values[4] = 0d;
} else {
values[4] = slopeFunctionCD * slopeThisCD * (d - tmf.d) / (slopeThisCD - slopeFunctionCD);
}
}
}
for (int i = 1; i < values.length; i++) {
if (values[i] > 1) {
values[i] = 0d;
}
}
result = Math.max(values[0], Math.max(values[1], Math.max(values[2], Math.max(values[3], values[4]))));
return result;
}
public TrapezoidalFunction addition(TrapezoidalFunction tpf) {
double[] limits = new double[]{a + tpf.a, b + tpf.b, c + tpf.c, d + tpf.d};
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction subtraction(TrapezoidalFunction tpf) {
double[] limits = new double[]{a - tpf.d, b - tpf.c, c - tpf.b, d - tpf.a};
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction multiplication(TrapezoidalFunction tpf) {
double[] limits = new double[]{a * tpf.a, b * tpf.b, c * tpf.c, d * tpf.d};
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction division(TrapezoidalFunction tpf) {
double[] limits = new double[]{a / tpf.d, b / tpf.c, c / tpf.b, d / tpf.a};
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction multiplicationScalar(double scalar) {
double[] limits;
if(scalar >= 0) {
limits = new double[]{a * scalar, b * scalar, c * scalar, d * scalar};
} else {
limits = new double[]{d * scalar, c * scalar, b * scalar, a * scalar};
}
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction divisionScalar(double scalar) {
double[] limits = null;
if(scalar != 0) {
limits = new double[]{a / scalar, b / scalar, c / scalar, d / scalar};
}
return new TrapezoidalFunction(limits);
}
public TrapezoidalFunction potence(double scalar) {
double[] limits = new double[]{Math.pow(a, scalar), Math.pow(b, scalar), Math.pow(c, scalar), Math.pow(d, scalar)};
return new TrapezoidalFunction(limits);
}
public double getSimpleDefuzzifiedValue() {
return (a + (2d * b) + (2d * c) + d) / 6d;
}
public double distance(TrapezoidalFunction tpf, double P) {
double acum = 0;
double limits1[] = getLimits(), limits2[] = tpf.getLimits();
for(int i = 0; i < 4; ++i) {
acum += Math.pow(Math.abs(limits1[i] - limits2[i]), P);
}
return Math.pow(acum, (1d / P)) / 4d;
}
@Override
public String toString() {
return ("Trapezoidal(" + a + ", " + b + ", " + c + ", " + d + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
public String prettyFormat() {
return ("T(" + Math.round(a * 100d) / 100d + ", " + Math.round(b * 100d) / 100d + ", " +
Math.round(c * 100d) / 100d + ", " + Math.round(d * 100d) / 100d + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
@Override
public boolean equals(Object obj) {
if(this == obj) {
return true;
}
if(obj == null) {
return false;
}
if(this.getClass() != obj.getClass()) {
return false;
}
final TrapezoidalFunction other = (TrapezoidalFunction) obj;
double aRound = Math.abs(new BigDecimal(a).setScale(3, RoundingMode.HALF_UP).doubleValue());
double bRound = Math.abs(new BigDecimal(b).setScale(3, RoundingMode.HALF_UP).doubleValue());
double cRound = Math.abs(new BigDecimal(c).setScale(3, RoundingMode.HALF_UP).doubleValue());
double dRound = Math.abs(new BigDecimal(d).setScale(3, RoundingMode.HALF_UP).doubleValue());
double aOtherRound = Math.abs(new BigDecimal(other.a).setScale(3, RoundingMode.HALF_UP).doubleValue());
double bOtherRound = Math.abs(new BigDecimal(other.b).setScale(3, RoundingMode.HALF_UP).doubleValue());
double cOtherRound = Math.abs(new BigDecimal(other.c).setScale(3, RoundingMode.HALF_UP).doubleValue());
double dOtherRound = Math.abs(new BigDecimal(other.d).setScale(3, RoundingMode.HALF_UP).doubleValue());
if(aRound == aOtherRound) {
if(bRound == bOtherRound) {
if(cRound == cOtherRound) {
if(dRound == dOtherRound) {
return true;
}
}
}
}
return false;
}
@Override
public Object clone() {
Object result = null;
try {
result = super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return result;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + a.hashCode();
result = prime * result + b.hashCode();
result = prime * result + c.hashCode();
result = prime * result + d.hashCode();
return result;
}
/**
* S. Abbasbandy and T. Hajjari, “A new approach for ranking of trapezoidal fuzzy numbers,” Computers & Mathematics with Applications, vol. 57, no. 3, pp. 413419, 2009.
*/
@Override
public int compareTo(IMembershipFunction other) {
Double mag1 = this.computeMagnitude();
Double mag2 = ((TrapezoidalFunction) other).computeMagnitude();
return mag1.compareTo(mag2);
}
public Double computeMagnitude() {
double alpha = Math.abs(a - b);
double beta = Math.abs(c - d);
return (1d / 2d) * (b + c - (alpha / 6) + (beta / 6));
}
}
@@ -0,0 +1,102 @@
package afryca.domain.fuzzyset.labelset;
import afryca.domain.fuzzyset.semantic.IMembershipFunction;
import afryca.valueforcer.ValueForcer;
public class Label implements Cloneable, Comparable<Label> {
private String name;
private IMembershipFunction semantic;
public Label(){}
public Label(String name, IMembershipFunction semantic) {
ValueForcer.notNull(semantic);
this.name = name;
this.semantic = semantic;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public IMembershipFunction getSemantic() {
return semantic;
}
public void setSemantic(IMembershipFunction semantic) {
this.semantic = semantic;
}
@Override
public String toString() {
return name;
}
public String toStringFile() {
return name + ";" + semantic.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Label other = (Label) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (semantic == null) {
if (other.semantic != null)
return false;
} else if (!semantic.equals(other.semantic))
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((semantic == null) ? 0 : semantic.hashCode());
return result;
}
@Override
public Object clone() {
Object result = null;
try {
result = super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
((Label) result).name = new String(name);
((Label) result).semantic = (IMembershipFunction) semantic.clone();
return result;
}
@Override
public int compareTo(Label other) {
ValueForcer.notNull(other);
return semantic.compareTo(other.semantic);
}
}
@@ -0,0 +1,187 @@
package afryca.domain.fuzzyset.labelset;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import afryca.valueforcer.ValueForcer;
public class LabelSet implements Cloneable {
private List<Label> _labels;
public LabelSet() {
_labels = new LinkedList<Label>();
}
public LabelSet(List<Label> labels) {
this();
setLabels(labels);
}
public void setLabels(List<Label> labels) {
ValueForcer.notNull(labels);
for (Label label : labels) {
addLabel(label);
}
_labels = labels;
}
public List<Label> getLabels() {
return _labels;
}
public void addLabel(Label label) {
addLabel(getCardinality(), label);
}
public void addLabel(int pos, Label label) {
ValueForcer.notNull(label);
ValueForcer.inRange(pos, 0, getCardinality());
if (containsLabel(label.getName())) {
throw new IllegalArgumentException();
}
_labels.add(pos, label);
}
public void removeLabel(int pos) {
ValueForcer.notEmpty(_labels.toArray());
ValueForcer.inRange(pos, 0, getCardinality() - 1);
_labels.remove(pos);
}
public void removeLabel(Label label) {
if (label == null) {
return;
}
int pos = getPos(label);
if (pos != -1) {
removeLabel(pos);
}
}
public boolean containsLabel(String name) {
return (getPos(name) != -1);
}
public boolean containsLabel(Label label) {
return _labels.contains(label);
}
public int getCardinality() {
return _labels.size();
}
public Label getLabel(int pos) {
ValueForcer.notEmpty(_labels.toArray());
ValueForcer.inRange(pos, 0, getCardinality() - 1);
return _labels.get(pos);
}
public Label getLabel(String name) {
int pos = getPos(name);
if (pos != -1) {
return getLabel(pos);
} else {
return null;
}
}
public int getPos(String name) {
if (name == null) {
return -1;
}
if (name.isEmpty()) {
return -1;
}
for (Label auxLabel : _labels) {
if (auxLabel.getName().equals(name)) {
return _labels.indexOf(auxLabel);
}
}
return -1;
}
public int getPos(Label label) {
return _labels.indexOf(label);
}
@Override
public String toString() {
String result = ""; //$NON-NLS-1$
int cardinality = getCardinality();
if (cardinality > 0) {
for (int pos = 0; pos < cardinality; ++pos) {
if (pos > 0) {
result += ", "; //$NON-NLS-1$
}
result += _labels.get(pos);
}
}
return "{" + result + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if(_labels.size()!=((LabelSet)obj).getLabels().size())
return false;
for (int i = 0; i < _labels.size(); i++) {
if(!_labels.get(i).equals(((LabelSet)obj).getLabels().get(i)))
return false;
}
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((_labels == null) ? 0 : Arrays.deepHashCode(_labels.toArray()));
return result;
}
@Override
public Object clone() {
Object result = null;
try {
result = super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
List<Label> resultLabels = new LinkedList<Label>();
for (Label label : _labels) {
resultLabels.add((Label) label.clone());
}
((LabelSet) result)._labels = resultLabels;
return result;
}
}
@@ -0,0 +1,28 @@
package afryca.domain.fuzzyset.semantic;
import afryca.domain.fuzzyset.FuzzySet;
import afryca.domain.fuzzyset.function.FragmentFunction;
import afryca.domain.real.NumericRealDomain;
public interface IMembershipFunction extends Cloneable, Comparable<IMembershipFunction> {
public FragmentFunction toFragmentFunction();
public boolean isSymmetrical();
public boolean isSymmetrical(IMembershipFunction other, double center);
public NumericRealDomain getCenter();
public NumericRealDomain getCoverage();
public double getMembershipValue(double x);
public double centroid();
public double maxMin(double max, double min);
public double maxMin(IMembershipFunction function, FuzzySet blts, FuzzySet domainValuation);
public Object clone();
}
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.domain.fuzzyset;singleton:=true
Bundle-Version: 1.0.0.202101221157
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: afryca.domain;bundle-version="1.0.0";visibility:=reexpor
t,afryca.domain.real;bundle-version="1.0.0";visibility:=reexport
Export-Package: afryca.domain.fuzzyset,afryca.domain.fuzzyset.function,a
fryca.domain.fuzzyset.function.types,afryca.domain.fuzzyset.labelset,af
ryca.domain.fuzzyset.semantic
Import-Package: afryca.structure
Automatic-Module-Name: afryca.domain.fuzzyset
@@ -0,0 +1,4 @@
#Fri Jan 22 13:00:27 CET 2021
artifact.main=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.fuzzyset\\target\\afryca.domain.fuzzyset-1.0.0-SNAPSHOT.jar
artifact.attached.p2artifacts=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.fuzzyset\\target\\p2artifacts.xml
artifact.attached.p2metadata=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.domain.fuzzyset\\target\\p2content.xml
@@ -0,0 +1,3 @@
artifactId=afryca.domain.fuzzyset
groupId=afryca.group
version=1.0.0-SNAPSHOT
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.domain.fuzzyset' version='1.0.0.202101221157'>
<properties size='5'>
<property name='artifact.size' value='25513'/>
<property name='download.size' value='25513'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.domain.fuzzyset'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
</artifact>
</artifacts>
@@ -0,0 +1,52 @@
<?xml version='1.0' encoding='UTF-8'?>
<units size='1'>
<unit id='afryca.domain.fuzzyset' version='1.0.0.202101221157' generation='2'>
<update id='afryca.domain.fuzzyset' range='[0.0.0,1.0.0.202101221157)' severity='0'/>
<properties size='6'>
<property name='es.Bundle-Name' value='Fuzzyset'/>
<property name='df_LT.Bundle-Name' value='Fuzzyset'/>
<property name='org.eclipse.equinox.p2.name' value='%Bundle-Name'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.domain.fuzzyset'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
<provides size='11'>
<provided namespace='org.eclipse.equinox.p2.iu' name='afryca.domain.fuzzyset' version='1.0.0.202101221157'/>
<provided namespace='osgi.bundle' name='afryca.domain.fuzzyset' version='1.0.0.202101221157'/>
<provided namespace='java.package' name='afryca.domain.fuzzyset' version='0.0.0'/>
<provided namespace='java.package' name='afryca.domain.fuzzyset.function' version='0.0.0'/>
<provided namespace='java.package' name='afryca.domain.fuzzyset.function.types' version='0.0.0'/>
<provided namespace='java.package' name='afryca.domain.fuzzyset.labelset' version='0.0.0'/>
<provided namespace='java.package' name='afryca.domain.fuzzyset.semantic' version='0.0.0'/>
<provided namespace='osgi.identity' name='afryca.domain.fuzzyset' version='1.0.0.202101221157'>
<properties size='1'>
<property name='type' value='osgi.bundle'/>
</properties>
</provided>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='es' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
</provides>
<requires size='4'>
<required namespace='osgi.bundle' name='afryca.domain' range='1.0.0'/>
<required namespace='osgi.bundle' name='afryca.domain.real' range='1.0.0'/>
<required namespace='java.package' name='afryca.structure' range='0.0.0'/>
<requiredProperties namespace='osgi.ee' match='(&amp;(osgi.ee=JavaSE)(version=1.8))'>
<description>
afryca.domain.fuzzyset
</description>
</requiredProperties>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.domain.fuzzyset' version='1.0.0.202101221157'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: afryca.domain.fuzzyset;singleton:=true&#xA;Bundle-Version: 1.0.0.202101221157&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
</units>