AddressMatch.Training.TrainMachine.Train C# (CSharp) Method

Train() public method

Train the AddrSet, string must be wrapped in InsertElement
public Train ( List list, bool withException ) : int
list List InsertElements' List
withException bool Indicate whether throw exception, /// if param is false, function will return 0 if train failed, if param is true, /// function will throw TrainException with detail information
return int
        public int Train(List<InsertElement> list, bool withException)
        {
            if (withException)
            {
                return TrainWithException(list);
            }
            else
            {
                return TrainWithNOException(list);
            }
        }

Usage Example

Beispiel #1
0
        private static void Train()
        {
            AddrSet addrset = AddrSet.GetInstance();

            TrainMachine t = new TrainMachine(addrset);

            List<InsertElement> list = new List<InsertElement>();

            Random rnd = new Random();

            list.Add(new InsertElement(rnd.Next().ToString("0.00"), LEVEL.City, InsertMode.AutoPlace | InsertMode.ExactlyLevel));

            t.Train(list, true);

            MatchHelper.rwLockDashboard(addrset);
        }
All Usage Examples Of AddressMatch.Training.TrainMachine::Train