player.gamer.statemachine.sadna

## Class Utils

- java.lang.Object
- - player.gamer.statemachine.sadna.Utils

-     public class Utils
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.Map<java.lang.Integer,java.lang.String>` | `attrs` Map between attribute index in the attributes vector and attribute name

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Utils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `readFile(java.lang.String fileName)`
    `static double[]` | `readWeights(java.lang.String fileName)`
    `static void` | `writeFile(java.lang.String fileName, java.lang.String content)`
    `static void` | `writeWeights(double[] weights, java.lang.String fileName)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### attrs

          public static java.util.Map<java.lang.Integer,java.lang.String> attrs

      Map between attribute index in the attributes vector and attribute name

  - ### Constructor Detail

    - #### Utils

          public Utils()

  - ### Method Detail

    - #### readWeights

          public static double[] readWeights(java.lang.String fileName)
                                      throws java.io.IOException

      Parameters:
        `fileName` - The weights vector file name
      Returns:
        weights vector
      Throws:
        `java.io.IOException`

    - #### writeWeights

          public static void writeWeights(double[] weights,
                          java.lang.String fileName)
                                   throws java.io.IOException

      Parameters:
        `weights` - Weights vector
        `fileName` - File name to write the vector to
      Throws:
        `java.io.IOException`

    - #### readFile

          public static java.lang.String readFile(java.lang.String fileName)
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeFile

          public static void writeFile(java.lang.String fileName,
                       java.lang.String content)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`