this.yAsize * this.numInputs;
}
// see SequenceFeatureFunction for java doc
public SparseVector apply(SparseVector[] xseq, int ytm1, int yt, int t) {
SparseVector result = new SparseVector();
for (int i = 0; i < xseq[t].numEntries(); i++) {
int x = xseq[t].getIndexAt(i);
// initial yt
if (t == 0) {
result.add(this.initialIndex(yt, x), 1);
// ymt1 times yt
} else {
result.add(this.labelXlabel(ytm1, yt, x), 1);
}
if (t == xseq.length - 1) {
result.add(this.finalIndex(yt, x), 1);
}
// yt times x
result.add(this.labelXinput(yt, x), 1);
}
int x = this.xAsize;
// initial yt
if (t == 0) {
result.add(this.initialIndex(yt, x), 1);
// ymt1 times yt
} else {
result.add(this.labelXlabel(ytm1, yt, x), 1);
}
if (t == xseq.length - 1) {
result.add(this.finalIndex(yt, x), 1);
}
// yt times x
result.add(this.labelXinput(yt, x), 1);
return result;
}