예제 #1
0
        public static JitterBugBase Create(string message, List <decimal> ipds, JitterBugType type, List <decimal> trainingIpds, int numBins, JitterBugInfo jBugInfo)
        {
            string binaryMessage = ConvertToBinary(message);

            JitterBugBase jitterBase;

            switch (type)
            {
            case JitterBugType.Rnd:
                jitterBase = new JitterBugRnd(binaryMessage, ipds, jBugInfo);
                break;

            case JitterBugType.NonRnd:
                jitterBase = new JitterBugNonRnd(binaryMessage, ipds, jBugInfo);
                break;

            case JitterBugType.Shaping:
                jitterBase = new JitterBugShaping(binaryMessage, ipds, jBugInfo, trainingIpds, numBins);
                break;

            default:
                throw new ApplicationException("Unknown Jitterbug type!");
            }

            return(jitterBase);
        }
예제 #2
0
        public static JitterBugBase Create(string message, List<decimal> ipds, JitterBugType type, List<decimal> trainingIpds, int numBins, JitterBugInfo jBugInfo)
        {
            string binaryMessage = ConvertToBinary(message);

            JitterBugBase jitterBase;

            switch(type)
            {
                case JitterBugType.Rnd:
                    jitterBase = new JitterBugRnd(binaryMessage, ipds, jBugInfo);
                    break;
                case JitterBugType.NonRnd:
                    jitterBase = new JitterBugNonRnd(binaryMessage, ipds, jBugInfo);
                    break;
                case JitterBugType.Shaping:
                    jitterBase = new JitterBugShaping(binaryMessage, ipds, jBugInfo, trainingIpds, numBins);
                    break;
                default:
                    throw new ApplicationException("Unknown Jitterbug type!");
            }

            return jitterBase;
        }