Ok. I can change it back to a member. We'll need to keep the .domain public method in order to do things like getting the size from outside. 

On Nov 19, 2013, at 1:15 PM, Alexandre Passos <notifications@github.com> wrote:

> In src/main/scala/cc/factorie/app/classify/backend/FeatureTemplates.scala:
> 
> > @@ -0,0 +1,124 @@
> > +package cc.factorie.app.classify.backend
> > +
> > +import cc.factorie.variable._
> > +import cc.factorie.la.{DenseTensor1, WeightsMapAccumulator, DenseTensor2, Tensor1}
> > +import cc.factorie.model.{Weights2, Parameters}
> > +
> > +
> > +class FeatureTemplateVectorVariable(val template: FeatureTemplate[_], val domain: CategoricalVectorDomain[String])  extends FeatureVectorVariable[String]
> > +class HashedFeatureTemplateVectorVariable(val template: FeatureTemplate[_], val domain: DiscreteDomain)  extends cc.factorie.variable.HashFeatureVectorVariable
> > +
> > +//templates have no state. They do not have associated domains. You pass a template to a domain, and it returns a feature vector that points to this domain.
> > +trait FeatureTemplateDomain {
> > +  def domain: VectorDomain
> I really don't think extension is the right way to go here. Domains don't create feature vector variables, I'd much rather have a member.
> …
> —
> Reply to this email directly or view it on GitHub.
>