Show / Hide Table of Contents

Class Signature

Represents a signature as a collection of features, containing the data that flows in the pipeline.

Inheritance
System.Object
Signature
Namespace: SigStat.Common
Assembly: SigStat.Common.dll
Syntax
public class Signature : IEnumerable<KeyValuePair<FeatureDescriptor, object>>

Constructors

| Improve this Doc View Source

Signature()

Initializes a signature instance

Declaration
public Signature()
| Improve this Doc View Source

Signature(String, Origin, Signer)

Initializes a signature instance with the given properties

Declaration
public Signature(string signatureID, Origin origin = default(Origin), Signer signer = null)
Parameters
Type Name Description
System.String signatureID
Origin origin
Signer signer

Properties

| Improve this Doc View Source

ID

An identifier for the Signature. Keep it unique to be useful for logs.

Declaration
public string ID { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Item[FeatureDescriptor]

Gets or sets the specified feature.

Declaration
public object this[FeatureDescriptor featureDescriptor] { get; set; }
Parameters
Type Name Description
FeatureDescriptor featureDescriptor
Property Value
Type Description
System.Object

The feature object without cast.

| Improve this Doc View Source

Item[String]

Gets or sets the specified feature.

Declaration
public object this[string featureKey] { get; set; }
Parameters
Type Name Description
System.String featureKey
Property Value
Type Description
System.Object

The feature object without cast.

| Improve this Doc View Source

Origin

Represents our knowledge on the origin of the signature. Unknown may be used in practice before it is verified.

Declaration
public Origin Origin { get; set; }
Property Value
Type Description
Origin
| Improve this Doc View Source

Signer

A reference to the Signer who this signature belongs to. (The origin is not constrained to be genuine.)

Declaration
public Signer Signer { get; set; }
Property Value
Type Description
Signer

Methods

| Improve this Doc View Source

GetAggregateFeature(List<FeatureDescriptor>)

Aggregate multiple features into one. Example: X, Y features -> P.xy feature. Use this for example at DTW algorithm input.

Declaration
public List<double[]> GetAggregateFeature(List<FeatureDescriptor> fs)
Parameters
Type Name Description
List<FeatureDescriptor> fs

List of features to aggregate.

Returns
Type Description
List<System.Double[]>

Aggregated feature value

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the features.

Declaration
public IEnumerator<KeyValuePair<FeatureDescriptor, object>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<FeatureDescriptor, System.Object>>

An enumerator that can be used to iterate through the features.

| Improve this Doc View Source

GetFeature<T>(FeatureDescriptor)

Gets the specified feature. This is the preferred way.

Declaration
public T GetFeature<T>(FeatureDescriptor featureDescriptor)
Parameters
Type Name Description
FeatureDescriptor featureDescriptor
Returns
Type Description
T

The casted feature object

Type Parameters
Name Description
T
| Improve this Doc View Source

GetFeature<T>(FeatureDescriptor<T>)

Gets the specified feature. This is the preferred way.

Declaration
public T GetFeature<T>(FeatureDescriptor<T> featureDescriptor)
Parameters
Type Name Description
FeatureDescriptor<T> featureDescriptor
Returns
Type Description
T

The casted feature object

Type Parameters
Name Description
T
| Improve this Doc View Source

GetFeature<T>(String)

Gets the specified feature.

Declaration
public T GetFeature<T>(string featureKey)
Parameters
Type Name Description
System.String featureKey
Returns
Type Description
T

The casted feature object

Type Parameters
Name Description
T
| Improve this Doc View Source

GetFeatureDescriptors()

Gets a collection of FeatureDescriptors that are used in this signature.

Declaration
public IEnumerable<FeatureDescriptor> GetFeatureDescriptors()
Returns
Type Description
IEnumerable<FeatureDescriptor>

A collection of FeatureDescriptors.

| Improve this Doc View Source

HasFeature(FeatureDescriptor)

Returns true if the signature contains the specified feature

Declaration
public bool HasFeature(FeatureDescriptor featureDescriptor)
Parameters
Type Name Description
FeatureDescriptor featureDescriptor
Returns
Type Description
System.Boolean
| Improve this Doc View Source

HasFeature(String)

Returns true if the signature contains the specified feature

Declaration
public bool HasFeature(string featureKey)
Parameters
Type Name Description
System.String featureKey
Returns
Type Description
System.Boolean
| Improve this Doc View Source

SetFeature<T>(FeatureDescriptor, T)

Sets the specified feature.

Declaration
public Signature SetFeature<T>(FeatureDescriptor featureDescriptor, T feature)
Parameters
Type Name Description
FeatureDescriptor featureDescriptor

The feature to put the new value in.

T feature

The value to set.

Returns
Type Description
Signature
Type Parameters
Name Description
T
| Improve this Doc View Source

SetFeature<T>(String, T)

Sets the specified feature.

Declaration
public Signature SetFeature<T>(string featureKey, T feature)
Parameters
Type Name Description
System.String featureKey

The unique key of the feature.

T feature

The value to set.

Returns
Type Description
Signature
Type Parameters
Name Description
T
| Improve this Doc View Source

ToString()

Returns a string representation of the signature

Declaration
public override string ToString()
Returns
Type Description
System.String

Extension Methods

StrokeHelper.GetStrokes(Signature)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX