Package de.tubs.pandemieinc
Class Pathogen
- java.lang.Object
-
- de.tubs.pandemieinc.Pathogen
-
- All Implemented Interfaces:
Comparable<Pathogen>
public class Pathogen extends Object implements Comparable<Pathogen>
Pathogen class to represent a Pathogen from the given "JSON round".
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Pathogen o)
Select the order of the pathogens by the attributes.static Pathogen
fromJsonNode(com.fasterxml.jackson.databind.JsonNode node)
Parse a Pathogen from the given JsonNode.static float[]
pathogensToNetwork(List<Pathogen> pathogens)
Parse the first round pathogens to the specified input layer for our neural networks.String
toString()
Modify toString() method to return the name of the given Pathogen.
-
-
-
Method Detail
-
fromJsonNode
public static Pathogen fromJsonNode(com.fasterxml.jackson.databind.JsonNode node)
Parse a Pathogen from the given JsonNode.- Parameters:
node
- The JsonNode that contains the "parsed" pathogen.- Returns:
- The parsed Pathogen instance or null on errors.
-
toString
public String toString()
Modify toString() method to return the name of the given Pathogen.
-
compareTo
public int compareTo(Pathogen o)
Select the order of the pathogens by the attributes.- Specified by:
compareTo
in interfaceComparable<Pathogen>
-
pathogensToNetwork
public static float[] pathogensToNetwork(List<Pathogen> pathogens)
Parse the first round pathogens to the specified input layer for our neural networks.- Parameters:
pathogens
- The list of pathogens that was encountered in the first round.- Returns:
- A float array as the specified input layer for our neural networks.
-
-