概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド

## jAudioFeatureExtractor.ACE.DataTypes
クラス FeatureDefinition

    java.lang.Object
      jAudioFeatureExtractor.ACE.DataTypes.FeatureDefinition

すべての実装されたインタフェース:
  java.io.Serializable

    public class FeatureDefinition

extends java.lang.Object
implements java.io.Serializable

Objects of this class each hold meta-data about a feature, as specified by the five public fields. Objects of this class do not hold any feature values of particular instances.

Methods are available for viewing the features, veryifying the uniqueness of their names, saving them to disk and loading the, from disk.

Daniel McEnnis 05-07-05 Added attributes to definition that describe the names (and implicitly number) of editable features.

作成者:
  Cory McKay
関連項目:
  直列化された形式

フィールドの概要
`java.lang.String[]` | `attributes` names of each editable attribute this feature has
`java.lang.String` | `description` A description of what the feature represents.
`int` | `dimensions` The number of values that exist for the feature for a given section of a data set.
`boolean` | `is_sequential` Specifies whether a feature can be applied to sub-section of a data set (e.g. a window of audio).
`java.lang.String` | `name` The name of the feature.

コンストラクタの概要
`FeatureDefinition()` Generate an empty FeatureDefinition with the name "Undefined Feature".
`FeatureDefinition(java.lang.String name, java.lang.String description, boolean is_sequential, int dimensions)` Explicitly define a new Feature Definition with no editable attributes.
`FeatureDefinition(java.lang.String name, java.lang.String description, boolean is_sequential, int dimensions, java.lang.String[] attributes)` Explicitly define a feature along with a description of editable attributes.

メソッドの概要
`java.lang.String` | `getFeatureDescription()` Returns a formatted text description of the FeatureDescription object.
`static java.lang.String` | `getFeatureDescriptions(FeatureDefinition[] definitions)` Returns a formatted text description of the given FeatureDescription objects.
`static FeatureDefinition[]` | `parseFeatureDefinitionsFile(java.lang.String feature_key_file_path)` Parses a feature_key_file_path XML file and returns an array of FeatureDefinitionwith objects holding its contents.
`static void` | `saveFeatureDefinitions(FeatureDefinition[] definitions, java.io.File to_save_to, java.lang.String comments)` Saves a feature_key_file_path XML file with the contents specified in the given FeatureDefinition array and the comments specified in the comments parameter.
`static java.lang.String` | `verifyFeatureNameUniqueness(FeatureDefinition[] definitions)` Checks if the given FeatureDefinitions hold any features with the same names.

クラス java.lang.Object から継承されたメソッド
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

フィールドの詳細

### name

    public java.lang.String name

  The name of the feature. This name should be unique among each set of features.

### description

    public java.lang.String description

  A description of what the feature represents. May be left as an empty string.

### is_sequential

    public boolean is_sequential

  Specifies whether a feature can be applied to sub-section of a data set (e.g. a window of audio). A value of true means that it can, and a value of false means that only one feature value may be extracted per data set.

### dimensions

    public int dimensions

  The number of values that exist for the feature for a given section of a data set. This value will be 1, except for multi-dimensional features.

### attributes

    public java.lang.String[] attributes

  names of each editable attribute this feature has

コンストラクタの詳細

### FeatureDefinition

    public FeatureDefinition()

  Generate an empty FeatureDefinition with the name "Undefined Feature".

### FeatureDefinition

    public FeatureDefinition(java.lang.String name,
                             java.lang.String description,
                             boolean is_sequential,
                             int dimensions)

  Explicitly define a new Feature Definition with no editable attributes.

  パラメータ:
    `name` - The name of the feature. This name should be unique among each set of features.
    `description` - A description of what the feature represents. May be left as an empty string.
    `is_sequential` - Specifies whether a feature can be applied to sequential windows of a data set. A value of true means that it can, and a value of false means that only one feature value may be extracted per data set.
    `dimensions` - The number of values that exist for the feature for a given section of a data set. This value will be 1, except for multi-dimensional features.

### FeatureDefinition

    public FeatureDefinition(java.lang.String name,
                             java.lang.String description,
                             boolean is_sequential,
                             int dimensions,
                             java.lang.String[] attributes)

  Explicitly define a feature along with a description of editable attributes.

  パラメータ:
    `name` - The name of the feature. This name should be unique among each set of features.
    `description` - A description of what the feature represents. May be left as an empty string.
    `is_sequential` - Specifies whether a feature can be applied to sequential windows of a data set. A value of true means that it can, and a value of false means that only one feature value may be extracted per data set.
    `dimensions` - The number of values that exist for the feature for a given section of a data set. This value will be 1, except for multi-dimensional features.
    `attributes` - The names of all editable attributes in the feature

メソッドの詳細

### getFeatureDescription

    public java.lang.String getFeatureDescription()

  Returns a formatted text description of the FeatureDescription object.

  戻り値:
    The formatted description.

### getFeatureDescriptions

    public static java.lang.String getFeatureDescriptions(FeatureDefinition[] definitions)

  Returns a formatted text description of the given FeatureDescription objects.

  パラメータ:
    `definitions` - The feature definitions to describe.
  戻り値:
    The formatted description.

### parseFeatureDefinitionsFile

    public static FeatureDefinition[] parseFeatureDefinitionsFile(java.lang.String feature_key_file_path)
                                                           throws java.lang.Exception

  Parses a feature_key_file_path XML file and returns an array of FeatureDefinitionwith objects holding its contents. An exception is thrown if the file is invalid in some way or if the file contains multiple feature. with the same name.

  パラメータ:
    `feature_key_file_path` - The path of the XML file to parse.
  例外:
    `java.lang.Exception` - Informative exceptions is thrown if an invalid file or file path is specified or if the file holds multiple features with the same name.

### saveFeatureDefinitions

    public static void saveFeatureDefinitions(FeatureDefinition[] definitions,
                                              java.io.File to_save_to,
                                              java.lang.String comments)
                                       throws java.lang.Exception

  Saves a feature_key_file_path XML file with the contents specified in the given FeatureDefinition array and the comments specified in the comments parameter. Also verifies that all of the given definitions have unique names, and throws an exception if they do not.

  パラメータ:
    `definitions` - The FeatureDefinitions to save.
    `to_save_to` - The file to save to.
    `comments` - Any comments to be saved inside the comments element of the XML file.
  例外:
    `java.lang.Exception` - An informative exception is thrown if the file cannot be saved or if any of the given definitions have the same name.

### verifyFeatureNameUniqueness

    public static java.lang.String verifyFeatureNameUniqueness(FeatureDefinition[] definitions)

  Checks if the given FeatureDefinitions hold any features with the same names. Returns null if there are no duplicates and a formatted string of the names which are duplicated if there are duplicates.

  パラメータ:
    `definitions` - The FeatureDefinitions to check for duplicate names.
  戻り値:
    Null if there are no duplicates and the names of the duplicates if there are duplicates.

概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド