Różnice
Różnice między wybraną wersją a wersją aktualną.
|
|
pl:miw:miw08_rbs_ml:nominaltest [2017/07/17 10:08] |
pl:miw:miw08_rbs_ml:nominaltest [2019/06/27 15:50] (aktualna) |
| <code=java> |
| package MachineLearning; |
| |
| import java.util.*; |
| |
| /** |
| * Klasa zawierająca rodzaj testu |
| * @author Angello |
| * |
| */ |
| public class NominalTest |
| { |
| public String AttributeName; |
| public Integer AttributeIndex; |
| private ArrayList<Integer> m_results; |
| |
| /** |
| * Konstruktor |
| * @param name |
| * @param id |
| */ |
| public NominalTest(String name, Integer id) |
| { |
| AttributeName = name; |
| AttributeIndex = id; |
| m_results = new ArrayList<Integer>(); |
| } |
| |
| |
| public ArrayList<Integer> Results() |
| { |
| return m_results; |
| } |
| |
| /** |
| * Dodaje nowy rezultat możliwy do uzyskania w tym teście |
| * @param result |
| */ |
| public void AddResult(Integer result) |
| { |
| if (!m_results.contains(result)) |
| m_results.add(result); |
| } |
| } |
| |
| </code> |