Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Problems.GrammaticalOptimization {
|
---|
8 | // for the feature extraction function for grammatical optimization problems (sparse representation)
|
---|
9 | public class Feature {
|
---|
10 | public string Id { get; private set; }
|
---|
11 | public double Value { get; private set; }
|
---|
12 |
|
---|
13 | public Feature(string id, double val) {
|
---|
14 | this.Id = id;
|
---|
15 | this.Value = val;
|
---|
16 | }
|
---|
17 |
|
---|
18 | public override string ToString() {
|
---|
19 | return string.Format("{0} {1:N3}", Id, Value);
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.