Changeset 2415 for trunk/sources/LibSVM/Problem.cs
- Timestamp:
- 10/07/09 11:58:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/LibSVM/Problem.cs
r1819 r2415 21 21 using System.IO; 22 22 using System.Collections.Generic; 23 using System.Threading; 24 using System.Globalization; 23 25 24 26 namespace SVM 25 27 { 26 /// < remarks>28 /// <summary> 27 29 /// Encapsulates a problem, or set of vectors which must be classified. 28 /// </ remarks>30 /// </summary> 29 31 [Serializable] 30 32 public class Problem … … 119 121 public static Problem Read(Stream stream) 120 122 { 123 TemporaryCulture.Start(); 124 121 125 StreamReader input = new StreamReader(stream); 122 126 List<double> vy = new List<double>(); … … 143 147 } 144 148 149 TemporaryCulture.Stop(); 150 145 151 return new Problem(vy.Count, vy.ToArray(), vx.ToArray(), max_index); 146 152 } … … 153 159 public static void Write(Stream stream, Problem problem) 154 160 { 161 TemporaryCulture.Start(); 162 155 163 StreamWriter output = new StreamWriter(stream); 156 164 for (int i = 0; i < problem.Count; i++) … … 162 170 } 163 171 output.Flush(); 172 173 TemporaryCulture.Stop(); 164 174 } 165 175
Note: See TracChangeset
for help on using the changeset viewer.