Smrf.NodeXL.ExcelTemplate.WordMetricCalculator2.AddCountedWordPairToValueLists C# (CSharp) Method

AddCountedWordPairToValueLists() protected method

protected AddCountedWordPairToValueLists ( CountedWordPair oCountedWordPair, WordMetricUserSettings oWordMetricUserSettings, List oWordPairWord1Values, List oWordPairWord2Values, List oWordPairCountValues, List oWordPairSalienceValues, List oWordPairMutualInformationValues ) : System.Boolean
oCountedWordPair Smrf.AppLib.CountedWordPair
oWordMetricUserSettings WordMetricUserSettings
oWordPairWord1Values List
oWordPairWord2Values List
oWordPairCountValues List
oWordPairSalienceValues List
oWordPairMutualInformationValues List
return System.Boolean
    AddCountedWordPairToValueLists
    (
        CountedWordPair oCountedWordPair,
        WordMetricUserSettings oWordMetricUserSettings,
        List<GraphMetricValueOrdered> oWordPairWord1Values,
        List<GraphMetricValueOrdered> oWordPairWord2Values,
        List<GraphMetricValueOrdered> oWordPairCountValues,
        List<GraphMetricValueOrdered> oWordPairSalienceValues,
        List<GraphMetricValueOrdered> oWordPairMutualInformationValues
    )
    {
        Debug.Assert(oCountedWordPair != null);
        Debug.Assert(oWordMetricUserSettings != null);
        Debug.Assert(oWordPairWord1Values != null);
        Debug.Assert(oWordPairWord2Values != null);
        Debug.Assert(oWordPairCountValues != null);
        Debug.Assert(oWordPairSalienceValues != null);
        Debug.Assert(oWordPairMutualInformationValues != null);
        AssertValid();

        if (
            oCountedWordPair.Count == 1
            &&
            oWordMetricUserSettings.SkipSingleTerms
            )
        {
            return (false);
        }

        oWordPairWord1Values.Add( new GraphMetricValueOrdered(
            ExcelUtil.ForceCellText(oCountedWordPair.Word1) ) );

        oWordPairWord2Values.Add( new GraphMetricValueOrdered(
            ExcelUtil.ForceCellText(oCountedWordPair.Word2) ) );

        oWordPairCountValues.Add(
            new GraphMetricValueOrdered(oCountedWordPair.Count) );

        oWordPairSalienceValues.Add(
            new GraphMetricValueOrdered(oCountedWordPair.Salience) );

        oWordPairMutualInformationValues.Add(
            new GraphMetricValueOrdered(oCountedWordPair.MutualInformation) );

        return (true);
    }