コード例 #1
0
ファイル: ZipfLearningModel.cs プロジェクト: boobooo42/LX4
 /* Constructors */
 public ZipfLearningModel(IMerkleTreeContext context)
 {
     m_guid    = System.Guid.NewGuid();
     m_context = context;
     // this.Status = "init";  /* FIXME */
     m_words    = new List <RankFrequencyPair>();
     m_progress = 0.0f;
 }
コード例 #2
0
ファイル: GloveLearningModel.cs プロジェクト: boobooo42/LX4
 public GloveLearningModel(IMerkleTreeContext context)
 {
     m_context   = context;
     cooccurArgs = new CooccurArgs();
     FillCooccurArgs(ref cooccurArgs);
     gloveArgs = new GloveArgs();
     FillGloveArgs(ref gloveArgs);
     shuffleArgs = new ShuffleArgs();
     FillShuffleArgs(ref shuffleArgs);
     vocabCountArgs = new VocabCountArgs();
     FillVocabCountArgs(ref vocabCountArgs);
 }
コード例 #3
0
ファイル: LearningModelFactory.cs プロジェクト: boobooo42/LX4
        /* Constructors */
        public LearningModelFactory(IMerkleTreeContext context)
        {
            m_context            = context;
            m_learningModelTypes = new List <Type>();

            /* Fill our array of learning model types */
            // m_learningModelTypes.Add(typeof(TestLearningModel));
            m_learningModelTypes.Add(typeof(TestLearningModel));
            m_learningModelTypes.Add(typeof(ZipfLearningModel));
            m_learningModelTypes.Add(typeof(GloveLearningModel));

            /* TODO: Add learning models from DLL assemblies */

            /* Ensure that each learning model type implements
             * ILearningModel */
            foreach (Type t in m_learningModelTypes)
            {
                Debug.Assert(t.GetInterfaces()
                             .Contains(typeof(ILearningModel)));
            }

            /* FIXME: Ensure that each learning model type implements the
             * needed static methods (with appropriate signatures) */
        }
コード例 #4
0
ファイル: MerkleController.cs プロジェクト: boobooo42/LX4
 public MerkleController(IMerkleTreeContext context)
 {
     m_context = context;
 }
コード例 #5
0
ファイル: TestLearningModel.cs プロジェクト: boobooo42/LX4
 public TestLearningModel(IMerkleTreeContext context)
 {
     m_context = context;
 }