Skip to content

Commit 9f20370

Browse files
authored
Merge pull request #70 from CST-Group/1.5.0
1.5.0
2 parents deb39d9 + f73d6ce commit 9f20370

6 files changed

Lines changed: 517 additions & 72 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Note: This library is still under development, and some concepts or features mig
2828
```
2929
dependencies {
3030
...
31-
implementation 'com.github.CST-Group:cst:1.4.2'
31+
implementation 'com.github.CST-Group:cst:1.5.0'
3232
}
3333
```
3434

@@ -53,7 +53,7 @@ Sometimes, the version number (tag) in this README gets out of date, as maintain
5353
<dependency>
5454
<groupId>com.github.CST-Group</groupId>
5555
<artifactId>cst</artifactId>
56-
<version>1.4.2</version>
56+
<version>1.5.0</version>
5757
</dependency>
5858
```
5959

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ java {
1717
}
1818

1919

20-
version = '1.4.2'
20+
version = '1.5.0'
2121

2222
repositories {
2323
mavenCentral()
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/***********************************************************************************************
2+
* Copyright (c) 2012 DCA-FEEC-UNICAMP
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the GNU Lesser Public License v3
5+
* which accompanies this distribution, and is available at
6+
* http://www.gnu.org/licenses/lgpl.html
7+
* <p>
8+
* Contributors:
9+
* K. Raizer, A. L. O. Paraense, E. M. Froes, R. R. Gudwin - initial API and implementation
10+
***********************************************************************************************/
11+
package br.unicamp.cst.representation.idea;
12+
13+
/**
14+
*
15+
* @author rgudwin
16+
*/
17+
public class EntityCategory implements Category {
18+
private Idea template;
19+
20+
public EntityCategory() {
21+
this(null);
22+
}
23+
24+
public EntityCategory(Idea template) {
25+
this.template = template;
26+
}
27+
28+
@Override
29+
public double membership(Idea idea) {
30+
if (template != null) {
31+
if (idea.equivalent(template)) return(1.0);
32+
else return(0.0);
33+
}
34+
return (1.0);
35+
}
36+
37+
public Idea getInstance() {
38+
return(this.getInstance(null));
39+
}
40+
41+
@Override
42+
public Idea getInstance(Idea constraints) {
43+
if (template != null)
44+
return (template.clone());
45+
else return(null);
46+
}
47+
}

0 commit comments

Comments
 (0)