コード例 #1
0
#pragma warning restore 1591

        /// <summary>
        /// Queries the filler text name corresponding to the FillerType.
        /// </summary>
        /// <param name="type">Specifies the FillerType.</param>
        /// <returns>The string associated with the FillerType is returned.</returns>
        public static string GetFillerName(FillerType type)
        {
            switch (type)
            {
            case FillerType.CONSTANT:
                return("constant");

            case FillerType.UNIFORM:
                return("uniform");

            case FillerType.GAUSSIAN:
                return("gaussian");

            case FillerType.XAVIER:
                return("xavier");

            case FillerType.MSRA:
                return("msra");

            case FillerType.POSITIVEUNITBALL:
                return("positive_unitball");

            case FillerType.BILINEAR:
                return("bilinear");

            default:
                throw new Exception("Unknown filler type '" + type.ToString() + "'");
            }
        }
コード例 #2
0
ファイル: LevelParameters.cs プロジェクト: TAPeri/WordsMatter
    public LevelParameters(string level)
    {
        string[] parameters = level.Split('-');

        foreach(string parameter in parameters){
            if(parameter.StartsWith("W")){
                wordLevel = System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("F")){
                fillerType = (FillerType)System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("B")){
                batchSize = System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("S")){
                speed = System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("A")){
                accuracy = System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("T")){
                ttsType = (TtsType)System.Convert.ToInt32(parameter.Substring(1));

            }else if(parameter.StartsWith("M")){
                mode = System.Convert.ToInt32(parameter.Substring(1));
            }else if(parameter.StartsWith("X")){
                amountTricky = System.Convert.ToInt32(parameter.Substring(1));
            }else if(parameter.StartsWith("D")){
                amountDistractors = System.Convert.ToInt32(parameter.Substring(1));
            }

        }
    }
コード例 #3
0
 // Internal constructor
 private Filler(FillerType type, Color color1, Color color2, HatchStyle hatchStyle, float linearGradientAngle, PathGradientType pathGradientType, ColorBlend gradientColors)
 {
     FillType            = type;
     this.color1         = color1;
     this.color2         = color2;
     HatchStyle          = hatchStyle;
     LinearGradientAngle = linearGradientAngle;
     PathGradientType    = pathGradientType;
     GradientColors      = (gradientColors == null) ? Utils.GetDefaultColorBlend() : gradientColors;
 }
コード例 #4
0
 public FillerConfiguration(FillerType type)
 {
     this.Type = type;
 }
コード例 #5
0
 public static FillerStyle GetDefault(FillerType type) => Defaults.TryGetValue(type, out FillerStyle style) ? style.CopyFillerStyle() : null;
コード例 #6
0
ファイル: Filler.cs プロジェクト: redknightlois/cudalearn
 public FillerConfiguration(FillerType type)
 {
     this.Type = type;
 }