Esempio n. 1
0
 /// <summary>
 /// Creates DFRSimilarity from the three components.
 /// <para/>
 /// Note that <c>null</c> values are not allowed:
 /// if you want no normalization or after-effect, instead pass
 /// <see cref="Normalization.NoNormalization"/> or <see cref="AfterEffect.NoAfterEffect"/> respectively. </summary>
 /// <param name="basicModel"> Basic model of information content </param>
 /// <param name="afterEffect"> First normalization of information gain </param>
 /// <param name="normalization"> Second (length) normalization </param>
 /// <exception cref="ArgumentNullException"><paramref name="basicModel"/>, <paramref name="afterEffect"/>,
 /// or <paramref name="normalization"/> is <c>null</c>.</exception>
 public DFRSimilarity(BasicModel basicModel, AfterEffect afterEffect, Normalization normalization)
 {
     // LUCENENET: Changed guard clauses from NullPointerException to ArgumentNullException
     this.m_basicModel    = basicModel ?? throw new ArgumentNullException(nameof(basicModel));
     this.m_afterEffect   = afterEffect ?? throw new ArgumentNullException(nameof(afterEffect));
     this.m_normalization = normalization ?? throw new ArgumentNullException(nameof(normalization));
 }
Esempio n. 2
0
 /// <summary>
 /// Creates DFRSimilarity from the three components.
 /// <para/>
 /// Note that <c>null</c> values are not allowed:
 /// if you want no normalization or after-effect, instead pass
 /// <see cref="Normalization.NoNormalization"/> or <see cref="AfterEffect.NoAfterEffect"/> respectively. </summary>
 /// <param name="basicModel"> Basic model of information content </param>
 /// <param name="afterEffect"> First normalization of information gain </param>
 /// <param name="normalization"> Second (length) normalization </param>
 public DFRSimilarity(BasicModel basicModel, AfterEffect afterEffect, Normalization normalization)
 {
     if (basicModel == null || afterEffect == null || normalization == null)
     {
         throw new System.NullReferenceException("null parameters not allowed.");
     }
     this.m_basicModel    = basicModel;
     this.m_afterEffect   = afterEffect;
     this.m_normalization = normalization;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates IBSimilarity from the three components.
 /// <para/>
 /// Note that <c>null</c> values are not allowed:
 /// if you want no normalization, instead pass
 /// <see cref="Normalization.NoNormalization"/>. </summary>
 /// <param name="distribution"> probabilistic distribution modeling term occurrence </param>
 /// <param name="lambda"> distribution's &#955;<sub>w</sub> parameter </param>
 /// <param name="normalization"> term frequency normalization </param>
 public IBSimilarity(Distribution distribution, Lambda lambda, Normalization normalization)
 {
     this.m_distribution  = distribution;
     this.m_lambda        = lambda;
     this.m_normalization = normalization;
 }