Repository: allenyangyl/Face_Liveness_Detection Branch: master Commit: 9e92d3353e8a Files: 178 Total size: 35.0 MB Directory structure: gitextract_0t6fbsbr/ ├── C++/ │ ├── README.txt │ ├── lbp/ │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── histogram.cpp │ │ ├── histogram.hpp │ │ ├── lbp.cpp │ │ ├── lbp.hpp │ │ ├── main.cpp │ │ ├── mapping_n16.txt │ │ └── mapping_n8.txt │ ├── liveness.cpp │ ├── liveness.h │ ├── svm_minmax_NUAA.txt │ ├── svm_model_NUAA │ └── test.cpp ├── Matlab/ │ ├── DoG.m │ ├── DoGLBP_Test.m │ ├── DoG_CASIA_Test.m │ ├── DoG_CASIA_Train.m │ ├── DoG_LBP_All_Train.m │ ├── DoG_LBP_CASIA_Test.m │ ├── DoG_LBP_CASIA_Train.m │ ├── DoG_LBP_NUAA_Test.m │ ├── DoG_LBP_NUAA_Train.m │ ├── DoG_LBP_PRINT_ATTACK_Test.m │ ├── DoG_LBP_PRINT_ATTACK_Train.m │ ├── DoG_NUAA_Test.m │ ├── DoG_NUAA_Train.m │ ├── DoG_PRINT_ATTACK_Test.m │ ├── DoG_PRINT_ATTACK_Train.m │ ├── HFD.m │ ├── HFDTest.m │ ├── HFDTrain.m │ ├── HOOF/ │ │ ├── README │ │ ├── README~ │ │ ├── chiSquareDist.m │ │ ├── computeDistanceModularHistogram.m │ │ ├── computeDistanceOrdinalHistogram.m │ │ ├── computeDistancesBetweenKPCASystems.m │ │ ├── findSubspaceAnglesBetweenKPCASystems.m │ │ ├── findSubspaceAnglesBetweenKPCASystemsSqrtHist.asv │ │ ├── findSubspaceAnglesBetweenKPCASystemsSqrtHist.m │ │ ├── gradientHistogram.m │ │ ├── histogramKernel.m │ │ ├── identifySystemUsingKPCA.m │ │ ├── traceKernelKPCASystems.m │ │ └── traceKernelKPCASystemsSqrtHist.m │ ├── HOOF.m │ ├── HSoptflow.m │ ├── LBP_CASIA_Test.m │ ├── LBP_CASIA_Train.m │ ├── LBP_NUAA_Test.m │ ├── LBP_NUAA_Train.m │ ├── LBP_PRINT_ATTACK_Test.m │ ├── LBP_PRINT_ATTACK_Train.m │ ├── LBP_feature.m │ ├── NUAA/ │ │ ├── client_test_normalized.txt │ │ ├── client_train_normalized.txt │ │ ├── imposter_test_normalized.txt │ │ ├── imposter_train_normalized.txt │ │ └── readme.txt │ ├── OF_All_Train.m │ ├── OF_CASIA_Test.m │ ├── OF_CASIA_Train.m │ ├── OF_PRINT_ATTACK_Test.m │ ├── OF_PRINT_ATTACK_Train.m │ ├── RealTime_DoGLBP.m │ ├── RealTime_OF.m │ ├── Save_CASIA_Test.m │ ├── Save_CASIA_Train.m │ ├── Save_NUAA.m │ ├── Save_PRINT_ATTACK_Test.m │ ├── Save_PRINT_ATTACK_Train.m │ ├── lbp-0.3.3/ │ │ ├── getmapping.m │ │ └── lbp.m │ ├── liblinear-1.96/ │ │ ├── COPYRIGHT │ │ ├── Makefile │ │ ├── Makefile.win │ │ ├── README │ │ ├── blas/ │ │ │ ├── Makefile │ │ │ ├── blas.h │ │ │ ├── blasp.h │ │ │ ├── daxpy.c │ │ │ ├── ddot.c │ │ │ ├── dnrm2.c │ │ │ └── dscal.c │ │ ├── heart_scale │ │ ├── linear.cpp │ │ ├── linear.def │ │ ├── linear.h │ │ ├── matlab/ │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── libsvmread.c │ │ │ ├── libsvmread.mexw64 │ │ │ ├── libsvmwrite.c │ │ │ ├── libsvmwrite.mexw64 │ │ │ ├── linear_model_matlab.c │ │ │ ├── linear_model_matlab.h │ │ │ ├── make.m │ │ │ ├── predict.c │ │ │ ├── predict.mexw64 │ │ │ ├── train.c │ │ │ └── train.mexw64 │ │ ├── predict.c │ │ ├── python/ │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── liblinear.py │ │ │ └── liblinearutil.py │ │ ├── train.c │ │ ├── tron.cpp │ │ ├── tron.h │ │ └── windows/ │ │ ├── libsvmread.mexw64 │ │ ├── libsvmwrite.mexw64 │ │ ├── predict.mexw64 │ │ └── train.mexw64 │ └── libsvm-3.19/ │ ├── COPYRIGHT │ ├── FAQ.html │ ├── Makefile │ ├── Makefile.win │ ├── README │ ├── heart_scale │ ├── java/ │ │ ├── Makefile │ │ ├── libsvm/ │ │ │ ├── svm.java │ │ │ ├── svm.m4 │ │ │ ├── svm_model.java │ │ │ ├── svm_node.java │ │ │ ├── svm_parameter.java │ │ │ ├── svm_print_interface.java │ │ │ └── svm_problem.java │ │ ├── libsvm.jar │ │ ├── svm_predict.java │ │ ├── svm_scale.java │ │ ├── svm_toy.java │ │ ├── svm_train.java │ │ └── test_applet.html │ ├── matlab/ │ │ ├── Makefile │ │ ├── README │ │ ├── libsvmread.c │ │ ├── libsvmread.mexw64 │ │ ├── libsvmwrite.c │ │ ├── libsvmwrite.mexw64 │ │ ├── make.m │ │ ├── svm_model_matlab.c │ │ ├── svm_model_matlab.h │ │ ├── svmpredict.c │ │ ├── svmpredict.mexw64 │ │ ├── svmtrain.c │ │ └── svmtrain.mexw64 │ ├── python/ │ │ ├── Makefile │ │ ├── README │ │ ├── svm.py │ │ └── svmutil.py │ ├── svm-predict.c │ ├── svm-scale.c │ ├── svm-toy/ │ │ ├── gtk/ │ │ │ ├── Makefile │ │ │ ├── callbacks.cpp │ │ │ ├── callbacks.h │ │ │ ├── interface.c │ │ │ ├── interface.h │ │ │ ├── main.c │ │ │ └── svm-toy.glade │ │ ├── qt/ │ │ │ ├── Makefile │ │ │ └── svm-toy.cpp │ │ └── windows/ │ │ └── svm-toy.cpp │ ├── svm-train.c │ ├── svm.cpp │ ├── svm.def │ ├── svm.h │ ├── tools/ │ │ ├── README │ │ ├── checkdata.py │ │ ├── easy.py │ │ ├── grid.py │ │ └── subset.py │ └── windows/ │ ├── libsvmread.mexw64 │ ├── libsvmwrite.mexw64 │ ├── svmpredict.mexw64 │ └── svmtrain.mexw64 └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: C++/README.txt ================================================ ļ嵥 liveness.cpp liveness.hͷļ svm_modelѵsvmģ svm_minmaxʱһIJ ./lbpLBPȡ ./libsvm-3.19LibSVM ҪĿcppļ liveness.cpp ./lbp/lbp.cpp ./lbp/histogram.cpp ./libsvm-3.19/svm.cpp õͷļΪ #include"liveness.h" ʹõOpenCV汾Ϊ3.0.0-RC1 ʹõݿNUAA, PRINT-ATTACK, CASIA Щⲻճ class ThuVisionFaceLiveCheck{ public: // Initialization: successful - true; failed - false bool Init(); // Liveness Predict: input image path or Mat. // If it is a real face, return true; otherwise, return false bool Check(std::string imgPath); bool Check(cv::Mat img); private: int img_size; int LBP_size; svm_model* model; double* Feature_Max; double* Feature_Min; vector mapping_r8; vector mapping_r16; }; ================================================ FILE: C++/lbp/CMakeLists.txt ================================================ PROJECT(githublbp) SET(CMAKE_BUILD_TYPE Release) CMAKE_MINIMUM_REQUIRED( VERSION 2.6 ) FIND_PACKAGE( OpenCV REQUIRED ) ADD_EXECUTABLE(lbp main.cpp lbp.cpp histogram.cpp) TARGET_LINK_LIBRARIES(lbp ${OpenCV_LIBS}) ================================================ FILE: C++/lbp/LICENSE ================================================ Copyright (c) 2011, philipp All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: C++/lbp/histogram.cpp ================================================ #include "histogram.hpp" #include template void lbp::histogram_(const Mat& src, Mat& hist, int numPatterns) { hist = Mat::zeros(1, numPatterns, CV_32SC1); for(int i = 0; i < src.rows; i++) { for(int j = 0; j < src.cols; j++) { int bin = src.at<_Tp>(i,j); hist.at(0,bin) += 1; } } } template double lbp::chi_square_(const Mat& histogram0, const Mat& histogram1) { if(histogram0.type() != histogram1.type()) CV_Error(CV_StsBadArg, "Histograms must be of equal type."); if(histogram0.rows != 1 || histogram0.rows != histogram1.rows || histogram0.cols != histogram1.cols) CV_Error(CV_StsBadArg, "Histograms must be of equal dimension."); double result = 0.0; for(int i=0; i < histogram0.cols; i++) { double a = histogram0.at<_Tp>(0,i) - histogram1.at<_Tp>(0,i); double b = histogram0.at<_Tp>(0,i) + histogram1.at<_Tp>(0,i); if(abs(b) > numeric_limits::epsilon()) { result+=(a*a)/b; } } return result; } void lbp::spatial_histogram(const Mat& src, Mat& hist, int numPatterns, const Size& window, int overlap) { int width = src.cols; int height = src.rows; vector histograms; for(int x=0; x < width - window.width + 1; x+=(window.width-overlap)) { for(int y=0; y < height-window.height + 1; y+=(window.height-overlap)) { Mat cell = Mat(src, Rect(x,y,window.width, window.height)); histograms.push_back(histogram(cell, numPatterns)); } } hist.create(1, histograms.size()*numPatterns, CV_32SC1); // i know this is a bit lame now... feel free to make this a bit more efficient... for(int histIdx=0; histIdx < histograms.size(); histIdx++) { for(int valIdx = 0; valIdx < numPatterns; valIdx++) { int y = histIdx*numPatterns+valIdx; hist.at(0,y) = histograms[histIdx].at(valIdx); } } } // wrappers void lbp::histogram(const Mat& src, Mat& hist, int numPatterns) { switch(src.type()) { case CV_8SC1: histogram_(src, hist, numPatterns); break; case CV_8UC1: histogram_(src, hist, numPatterns); break; case CV_16SC1: histogram_(src, hist, numPatterns); break; case CV_16UC1: histogram_(src, hist, numPatterns); break; case CV_32SC1: histogram_(src, hist, numPatterns); break; } } double lbp::chi_square(const Mat& histogram0, const Mat& histogram1) { switch(histogram0.type()) { case CV_8SC1: return chi_square_(histogram0,histogram1); break; case CV_8UC1: return chi_square_(histogram0,histogram1); break; case CV_16SC1: return chi_square_(histogram0, histogram1); break; case CV_16UC1: return chi_square_(histogram0,histogram1); break; case CV_32SC1: return chi_square_(histogram0,histogram1); break; } } void lbp::spatial_histogram(const Mat& src, Mat& dst, int numPatterns, int gridx, int gridy, int overlap) { int width = static_cast(floor(src.cols / gridx)); int height = static_cast(floor(src.rows / gridy)); spatial_histogram(src, dst, numPatterns, Size_(width, height), overlap); } // Mat return type functions Mat lbp::histogram(const Mat& src, int numPatterns) { Mat hist; histogram(src, hist, numPatterns); return hist; } Mat lbp::spatial_histogram(const Mat& src, int numPatterns, const Size& window, int overlap) { Mat hist; spatial_histogram(src, hist, numPatterns, window, overlap); return hist; } Mat lbp::spatial_histogram(const Mat& src, int numPatterns, int gridx, int gridy, int overlap) { Mat hist; spatial_histogram(src, hist, numPatterns, gridx, gridy, overlap); return hist; } ================================================ FILE: C++/lbp/histogram.hpp ================================================ #ifndef HISTOGRAM_HPP_ #define HISTOGRAM_HPP_ //! \author philipp //! \copyright BSD, see LICENSE. #include #include using namespace cv; using namespace std; namespace lbp { // templated functions template void histogram_(const Mat& src, Mat& hist, int numPatterns); template double chi_square_(const Mat& histogram0, const Mat& histogram1); // non-templated functions void spatial_histogram(const Mat& src, Mat& spatialhist, int numPatterns, const Size& window, int overlap=0); // wrapper functions void spatial_histogram(const Mat& src, Mat& spatialhist, int numPatterns, int gridx=8, int gridy=8, int overlap=0); void histogram(const Mat& src, Mat& hist, int numPatterns); double chi_square(const Mat& histogram0, const Mat& histogram1); // Mat return type functions Mat histogram(const Mat& src, int numPatterns); Mat spatial_histogram(const Mat& src, int numPatterns, const Size& window, int overlap=0); Mat spatial_histogram(const Mat& src, int numPatterns, int gridx=8, int gridy=8, int overlap=0); } #endif ================================================ FILE: C++/lbp/lbp.cpp ================================================ #include "lbp.hpp" #define M_PI 3.14159265358979323846 using namespace cv; template void lbp::OLBP_(const Mat& src, Mat& dst) { dst = Mat::zeros(src.rows-2, src.cols-2, CV_8UC1); for(int i=1;i(i,j); unsigned char code = 0; code |= (src.at<_Tp>(i-1,j-1) > center) << 7; code |= (src.at<_Tp>(i-1,j) > center) << 6; code |= (src.at<_Tp>(i-1,j+1) > center) << 5; code |= (src.at<_Tp>(i,j+1) > center) << 4; code |= (src.at<_Tp>(i+1,j+1) > center) << 3; code |= (src.at<_Tp>(i+1,j) > center) << 2; code |= (src.at<_Tp>(i+1,j-1) > center) << 1; code |= (src.at<_Tp>(i,j-1) > center) << 0; dst.at(i-1,j-1) = code; } } } template void lbp::ELBP_(const Mat& src, Mat& dst, int radius, int neighbors) { neighbors = max(min(neighbors,31),1); // set bounds... // Note: alternatively you can switch to the new OpenCV Mat_ // type system to define an unsigned int matrix... I am probably // mistaken here, but I didn't see an unsigned int representation // in OpenCV's classic typesystem... dst = Mat::zeros(src.rows-2*radius, src.cols-2*radius, CV_32SC1); for(int n=0; n(radius) * cos(2.0*M_PI*n/static_cast(neighbors)); float y = static_cast(radius) * -sin(2.0*M_PI*n/static_cast(neighbors)); // relative indices int fx = static_cast(floor(x)); int fy = static_cast(floor(y)); int cx = static_cast(ceil(x)); int cy = static_cast(ceil(y)); // fractional part float ty = y - fy; float tx = x - fx; // set interpolation weights float w1 = (1 - tx) * (1 - ty); float w2 = tx * (1 - ty); float w3 = (1 - tx) * ty; float w4 = tx * ty; // iterate through your data for(int i=radius; i < src.rows-radius;i++) { for(int j=radius;j < src.cols-radius;j++) { float t = w1*src.at<_Tp>(i+fy,j+fx) + w2*src.at<_Tp>(i+fy,j+cx) + w3*src.at<_Tp>(i+cy,j+fx) + w4*src.at<_Tp>(i+cy,j+cx); // we are dealing with floating point precision, so add some little tolerance dst.at(i-radius,j-radius) += ((t > src.at<_Tp>(i,j)) && (abs(t-src.at<_Tp>(i,j)) > std::numeric_limits::epsilon())) << n; } } } } template void lbp::VARLBP_(const Mat& src, Mat& dst, int radius, int neighbors) { max(min(neighbors,31),1); // set bounds dst = Mat::zeros(src.rows-2*radius, src.cols-2*radius, CV_32FC1); //! result // allocate some memory for temporary on-line variance calculations Mat _mean = Mat::zeros(src.rows, src.cols, CV_32FC1); Mat _delta = Mat::zeros(src.rows, src.cols, CV_32FC1); Mat _m2 = Mat::zeros(src.rows, src.cols, CV_32FC1); for(int n=0; n(radius) * cos(2.0*M_PI*n/static_cast(neighbors)); float y = static_cast(radius) * -sin(2.0*M_PI*n/static_cast(neighbors)); // relative indices int fx = static_cast(floor(x)); int fy = static_cast(floor(y)); int cx = static_cast(ceil(x)); int cy = static_cast(ceil(y)); // fractional part float ty = y - fy; float tx = x - fx; // set interpolation weights float w1 = (1 - tx) * (1 - ty); float w2 = tx * (1 - ty); float w3 = (1 - tx) * ty; float w4 = tx * ty; // iterate through your data for(int i=radius; i < src.rows-radius;i++) { for(int j=radius;j < src.cols-radius;j++) { float t = w1*src.at<_Tp>(i+fy,j+fx) + w2*src.at<_Tp>(i+fy,j+cx) + w3*src.at<_Tp>(i+cy,j+fx) + w4*src.at<_Tp>(i+cy,j+cx); _delta.at(i,j) = t - _mean.at(i,j); _mean.at(i,j) = (_mean.at(i,j) + (_delta.at(i,j) / (1.0*(n+1)))); // i am a bit paranoid _m2.at(i,j) = _m2.at(i,j) + _delta.at(i,j) * (t - _mean.at(i,j)); } } } // calculate result for(int i = radius; i < src.rows-radius; i++) { for(int j = radius; j < src.cols-radius; j++) { dst.at(i-radius, j-radius) = _m2.at(i,j) / (1.0*(neighbors-1)); } } } // now the wrapper functions void lbp::OLBP(const Mat& src, Mat& dst) { switch(src.type()) { case CV_8SC1: OLBP_(src, dst); break; case CV_8UC1: OLBP_(src, dst); break; case CV_16SC1: OLBP_(src, dst); break; case CV_16UC1: OLBP_(src, dst); break; case CV_32SC1: OLBP_(src, dst); break; case CV_32FC1: OLBP_(src, dst); break; case CV_64FC1: OLBP_(src, dst); break; } } void lbp::ELBP(const Mat& src, Mat& dst, int radius, int neighbors) { switch(src.type()) { case CV_8SC1: ELBP_(src, dst, radius, neighbors); break; case CV_8UC1: ELBP_(src, dst, radius, neighbors); break; case CV_16SC1: ELBP_(src, dst, radius, neighbors); break; case CV_16UC1: ELBP_(src, dst, radius, neighbors); break; case CV_32SC1: ELBP_(src, dst, radius, neighbors); break; case CV_32FC1: ELBP_(src, dst, radius, neighbors); break; case CV_64FC1: ELBP_(src, dst, radius, neighbors); break; } } void lbp::VARLBP(const Mat& src, Mat& dst, int radius, int neighbors) { switch(src.type()) { case CV_8SC1: VARLBP_(src, dst, radius, neighbors); break; case CV_8UC1: VARLBP_(src, dst, radius, neighbors); break; case CV_16SC1: VARLBP_(src, dst, radius, neighbors); break; case CV_16UC1: VARLBP_(src, dst, radius, neighbors); break; case CV_32SC1: VARLBP_(src, dst, radius, neighbors); break; case CV_32FC1: VARLBP_(src, dst, radius, neighbors); break; case CV_64FC1: VARLBP_(src, dst, radius, neighbors); break; } } // now the Mat return functions Mat lbp::OLBP(const Mat& src) { Mat dst; OLBP(src, dst); return dst; } Mat lbp::ELBP(const Mat& src, int radius, int neighbors) { Mat dst; ELBP(src, dst, radius, neighbors); return dst; } Mat lbp::VARLBP(const Mat& src, int radius, int neighbors) { Mat dst; VARLBP(src, dst, radius, neighbors); return dst; } ================================================ FILE: C++/lbp/lbp.hpp ================================================ #ifndef LBP_HPP_ #define LBP_HPP_ //! \author philipp //! \copyright BSD, see LICENSE. #include #include using namespace cv; using namespace std; namespace lbp { // templated functions template void OLBP_(const cv::Mat& src, cv::Mat& dst); template void ELBP_(const cv::Mat& src, cv::Mat& dst, int radius = 1, int neighbors = 8); template void VARLBP_(const cv::Mat& src, cv::Mat& dst, int radius = 1, int neighbors = 8); // wrapper functions void OLBP(const Mat& src, Mat& dst); void ELBP(const Mat& src, Mat& dst, int radius = 1, int neighbors = 8); void VARLBP(const Mat& src, Mat& dst, int radius = 1, int neighbors = 8); // Mat return type functions Mat OLBP(const Mat& src); Mat ELBP(const Mat& src, int radius = 1, int neighbors = 8); Mat VARLBP(const Mat& src, int radius = 1, int neighbors = 8); } #endif ================================================ FILE: C++/lbp/main.cpp ================================================ #include #include #include "lbp.hpp" #include "histogram.hpp" using namespace cv; int main(int argc, const char *argv[]) { int deviceId = 0; if(argc > 1) deviceId = atoi(argv[1]); VideoCapture cap(deviceId); if(!cap.isOpened()) { cerr << "Capture Device ID " << deviceId << "cannot be opened." << endl; return -1; } // initial values int radius = 1; int neighbors = 8; // windows namedWindow("original",CV_WINDOW_AUTOSIZE); namedWindow("lbp",CV_WINDOW_AUTOSIZE); // matrices used Mat frame; // always references the last frame Mat dst; // image after preprocessing Mat lbp; // lbp image // just to switch between possible lbp operators vector lbp_names; lbp_names.push_back("Extended LBP"); // 0 lbp_names.push_back("Fixed Sampling LBP"); // 1 lbp_names.push_back("Variance-based LBP"); // 2 int lbp_operator=0; bool running=true; while(running) { cap >> frame; cvtColor(frame, dst, CV_BGR2GRAY); GaussianBlur(dst, dst, Size(7,7), 5, 3, BORDER_CONSTANT); // tiny bit of smoothing is always a good idea // comment the following lines for original size resize(frame, frame, Size(), 0.5, 0.5); resize(dst,dst,Size(), 0.5, 0.5); // switch(lbp_operator) { case 0: lbp::ELBP(dst, lbp, radius, neighbors); // use the extended operator break; case 1: lbp::OLBP(dst, lbp); // use the original operator break; case 2: lbp::VARLBP(dst, lbp, radius, neighbors); break; } // now to show the patterns a normalization is necessary // a simple min-max norm will do the job... normalize(lbp, lbp, 0, 255, NORM_MINMAX, CV_8UC1); imshow("original", frame); imshow("lbp", lbp); char key = (char) waitKey(20); // exit on escape if(key == 27) running=false; // to make it a bit interactive, you can increase and decrease the parameters switch(key) { case 'q': case 'Q': running=false; break; // lower case r decreases the radius (min 1) case 'r': radius-=1; radius = std::max(radius,1); cout << "radius=" << radius << endl; break; // upper case r increases the radius (there's no real upper bound) case 'R': radius+=1; radius = std::min(radius,32); cout << "radius=" << radius << endl; break; // lower case p decreases the number of sampling points (min 1) case 'p': neighbors-=1; neighbors = std::max(neighbors,1); cout << "sampling points=" << neighbors << endl; break; // upper case p increases the number of sampling points (max 31) case 'P': neighbors+=1; neighbors = std::min(neighbors,31); cout << "sampling points=" << neighbors << endl; break; // switch between operators case 'o': case 'O': lbp_operator = (lbp_operator + 1) % 3; cout << "Switched to operator " << lbp_names[lbp_operator] << endl; break; case 's': case 'S': imwrite("original.jpg", frame); imwrite("lbp.jpg", lbp); cout << "Screenshot (operator=" << lbp_names[lbp_operator] << ",radius=" << radius <<",points=" << neighbors << ")" << endl; break; default: break; } } return 0; // success } ================================================ FILE: C++/lbp/mapping_n16.txt ================================================ 0 1 2 3 4 242 5 6 7 242 242 242 8 242 9 10 11 242 242 242 242 242 242 242 12 242 242 242 13 242 14 15 16 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 17 242 242 242 242 242 242 242 18 242 242 242 19 242 20 21 22 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 23 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 24 242 242 242 242 242 242 242 25 242 242 242 26 242 27 28 29 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 30 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 31 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 32 242 242 242 242 242 242 242 33 242 242 242 34 242 35 36 37 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 38 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 39 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 40 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 41 242 242 242 242 242 242 242 42 242 242 242 43 242 44 45 46 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 47 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 48 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 49 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 50 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 51 242 242 242 242 242 242 242 52 242 242 242 53 242 54 55 56 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 57 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 58 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 59 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 60 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 61 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 62 242 242 242 242 242 242 242 63 242 242 242 64 242 65 66 67 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 68 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 69 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 70 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 71 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 72 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 73 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 74 242 242 242 242 242 242 242 75 242 242 242 76 242 77 78 79 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 80 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 81 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 82 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 83 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 84 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 85 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 86 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 87 242 242 242 242 242 242 242 88 242 242 242 89 242 90 91 92 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 93 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 94 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 95 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 96 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 97 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 98 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 99 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 100 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 101 242 242 242 242 242 242 242 102 242 242 242 103 242 104 105 106 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 107 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 108 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 109 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 110 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 111 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 112 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 113 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 114 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 115 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 116 242 242 242 242 242 242 242 117 242 242 242 118 242 119 120 121 122 242 123 242 242 242 124 242 242 242 242 242 242 242 125 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 126 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 127 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 128 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 129 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 130 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 131 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 132 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 133 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 134 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 135 136 137 242 138 242 242 242 139 242 242 242 242 242 242 242 140 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 141 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 142 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 143 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 144 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 145 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 146 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 147 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 148 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 149 150 151 242 152 242 242 242 153 242 242 242 242 242 242 242 154 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 155 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 156 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 157 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 158 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 159 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 160 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 161 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 162 163 164 242 165 242 242 242 166 242 242 242 242 242 242 242 167 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 168 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 169 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 170 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 171 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 172 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 173 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 174 175 176 242 177 242 242 242 178 242 242 242 242 242 242 242 179 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 180 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 181 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 182 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 183 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 184 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 185 186 187 242 188 242 242 242 189 242 242 242 242 242 242 242 190 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 191 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 192 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 193 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 194 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 195 196 197 242 198 242 242 242 199 242 242 242 242 242 242 242 200 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 201 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 202 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 203 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 204 205 206 242 207 242 242 242 208 242 242 242 242 242 242 242 209 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 210 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 211 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 212 213 214 242 215 242 242 242 216 242 242 242 242 242 242 242 217 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 218 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 219 220 221 242 222 242 242 242 223 242 242 242 242 242 242 242 224 242 242 242 242 242 242 242 242 242 242 242 242 242 242 242 225 226 227 242 228 242 242 242 229 242 242 242 242 242 242 242 230 231 232 242 233 242 242 242 234 235 236 242 237 238 239 240 241 ================================================ FILE: C++/lbp/mapping_n8.txt ================================================ 0 1 2 3 4 58 5 6 7 58 58 58 8 58 9 10 11 58 58 58 58 58 58 58 12 58 58 58 13 58 14 15 16 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 17 58 58 58 58 58 58 58 18 58 58 58 19 58 20 21 22 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 23 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 24 58 58 58 58 58 58 58 25 58 58 58 26 58 27 28 29 30 58 31 58 58 58 32 58 58 58 58 58 58 58 33 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 34 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 35 36 37 58 38 58 58 58 39 58 58 58 58 58 58 58 40 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 41 42 43 58 44 58 58 58 45 58 58 58 58 58 58 58 46 47 48 58 49 58 58 58 50 51 52 58 53 54 55 56 57 ================================================ FILE: C++/liveness.cpp ================================================ #include"liveness.h" // Sigmoid double sigmoid(double input) { return 1 / ( 1 + exp(-input) ); } // DoG Features Mat DoG(Mat input, double sigma1, double sigma2) { Mat XF1, XF2, DXF, output; int size1, size2; // Filter Sizes size1 = 2 * (int)(3*sigma1) + 3; size2 = 2 * (int)(3*sigma2) + 3; // Gaussian Filter GaussianBlur(input, XF1, Size(size1, size1), sigma1, sigma1, BORDER_REPLICATE); GaussianBlur(input, XF2, Size(size2, size2), sigma2, sigma2, BORDER_REPLICATE); // Difference DXF = XF1 - XF2; // Discrete Fourier Transform DXF.convertTo(DXF, CV_64FC1); dft(DXF, output); return abs(output); } // LBP Features Mat LBP(Mat input, vector mapping_r8, vector mapping_r16) { // LBP(r2, n16) Mat LBP_16_2 = lbp::ELBP(input, 2, 16); for(int i = 0; i < LBP_16_2.rows; i++) for(int j = 0; j < LBP_16_2.cols; j++) LBP_16_2.at(i, j) = mapping_r16[LBP_16_2.at(i, j)]; Mat hist_16_2 = lbp::histogram(LBP_16_2, 243); // LBP(r2, n8) Mat LBP_8_2 = lbp::ELBP(input, 2, 8); for(int i = 0; i < LBP_8_2.rows; i++) for(int j = 0; j < LBP_8_2.cols; j++) LBP_8_2.at(i, j) = mapping_r8[LBP_8_2.at(i, j)]; Mat hist_8_2 = lbp::histogram(LBP_8_2, 59); // LBP(r1, n8) * 9 Mat LBP_8_1 = lbp::ELBP(input, 1, 8); for(int i = 0; i < LBP_8_1.rows; i++) for(int j = 0; j < LBP_8_1.cols; j++) LBP_8_1.at(i, j) = mapping_r8[LBP_8_1.at(i, j)]; Mat hist_8_1 = lbp::spatial_histogram(LBP_8_1, 59, Size_(30, 30), 14); // Histogram Concatenate Mat hist_8, hist; hconcat(hist_8_2, hist_8_1, hist_8); hconcat(hist_16_2, hist_8, hist); return hist; } // Extract Features svm_node* Liveness_Feature(Mat img, vector mapping_r8, vector mapping_r16, int img_size, int LBP_size) { // Total feature size int fea_size = img_size * img_size + LBP_size; // Grayscale cvtColor(img, img, CV_BGR2GRAY); // Histogram Equlization - Ineffective //equalizeHist(img, img); // Image Resize resize(img, img, Size(img_size, img_size)); // DoG Features Mat DoG_Feature = DoG(img); // LBP Features Mat LBP_Feature = LBP(img, mapping_r8, mapping_r16); // Filling Features in svm_node svm_node* features = new svm_node[fea_size+1]; for(int i = 0; i < DoG_Feature.rows; i++) for(int j = 0; j < DoG_Feature.cols; j++) { features[i*img_size+j].index = i*img_size+j+1; features[i*img_size+j].value = DoG_Feature.at(i, j); } for(int i = 0; i < LBP_Feature.cols; i++) { features[img_size*img_size+i].index = img_size*img_size+i+1; features[img_size*img_size+i].value = (double)LBP_Feature.at(0, i); } features[fea_size].index = -1; // Return return features; } // Prediction double Liveness_Predict(Mat img, svm_model* model, double* Feature_Max, double* Feature_Min, vector mapping_r8, vector mapping_r16, int img_size, int LBP_size) { int fea_size = img_size * img_size + LBP_size; svm_node* features = Liveness_Feature(img, mapping_r8, mapping_r16, img_size, LBP_size); for(int i = 0; i < fea_size; i++) features[i].value = (features[i].value - Feature_Min[i]) / (Feature_Max[i] - Feature_Min[i]); double Value; double Label = svm_predict_values(model, features, &Value); delete[] features; return Value; } // Initialization bool ThuVisionFaceLiveCheck::Init() { // Image size, LBP feature size and total feature size img_size = 64; LBP_size = 243 + 59 + 9*59; int fea_size = img_size * img_size + LBP_size; // Path char* svm_path = "svm_model"; char* minmax_path = "svm_minmax.txt"; string Mapping_r8_path = ".\\lbp\\mapping_n8.txt"; string Mapping_r16_path = ".\\lbp\\mapping_n16.txt"; // Load Model svm_model* SVM_Model = svm_load_model(svm_path); if(model == NULL) { std::cout << "Can not open file: " << svm_path << endl; return false; } model = SVM_Model; // Scaling ifstream feature_minmax_file; string feature_minmax_path = minmax_path; feature_minmax_file.open(feature_minmax_path); if(!feature_minmax_file.is_open()) { std::cout << "Can not open file: " << feature_minmax_path << endl; return false; } double* SVM_Feature_Max = new double[fea_size]; double* SVM_Feature_Min = new double[fea_size]; for(int Feature_Idx = 0; Feature_Idx < fea_size; Feature_Idx++) feature_minmax_file >> SVM_Feature_Max[Feature_Idx] >> SVM_Feature_Min[Feature_Idx]; Feature_Max = SVM_Feature_Max; Feature_Min = SVM_Feature_Min; int mapping; // LBP n=8 mapping vector SVM_mapping_r8; ifstream Mapping_r8_file; Mapping_r8_file.open(Mapping_r8_path); if(!Mapping_r8_file.is_open()) { std::cout << "Can not open file: " << Mapping_r8_path << endl; return false; } for(int i = 0; i < 256; i++) { Mapping_r8_file >> mapping; SVM_mapping_r8.push_back(mapping); } mapping_r8 = SVM_mapping_r8; // LBP n=16 mapping vector SVM_mapping_r16; ifstream Mapping_r16_file; Mapping_r16_file.open(Mapping_r16_path); if(!Mapping_r16_file.is_open()) { std::cout << "Can not open file: " << Mapping_r16_path << endl; return false; } for(int i = 0; i < 65536; i++) { Mapping_r16_file >> mapping; SVM_mapping_r16.push_back(mapping); } mapping_r16 = SVM_mapping_r16; return true; } // Check with image as an input double ThuVisionFaceLiveCheck::Check(cv::Mat img) { // Predict double value = Liveness_Predict(img, model, Feature_Max, Feature_Min, mapping_r8, mapping_r16, img_size, LBP_size); return sigmoid(value); } // Check with path as an input double ThuVisionFaceLiveCheck::Check(std::string imgPath) { // Load Image Mat img = imread(imgPath); if(img.empty()) { std::cout << "Can not load image: " << imgPath << endl; return false; } return ThuVisionFaceLiveCheck::Check(img); } void Train() { // Image size, LBP feature size and total feature size int img_size = 64; int LBP_size = 243 + 59 + 9*59; int fea_size = img_size * img_size + LBP_size; // Path char* svm_path = "svm_model"; char* minmax_path = "svm_minmax.txt"; string Mapping_r8_path = ".\\lbp\\mapping_n8.txt"; string Mapping_r16_path = ".\\lbp\\mapping_n16.txt"; // Train data set int real_train_count[] = {1742, 22274, 6322}; int fake_train_count[] = {1748, 14064, 22080}; string train_set[] = {"NUAA", "PRINT-ATTACK", "CASIA"}; string real_train_name; string fake_train_name; vector real_train_value; vector fake_train_value; // LibSVM svm_problem svm_prob; svm_parameter svm_param; svm_prob.l = real_train_count[0] + real_train_count[1] + real_train_count[2] + fake_train_count[0] + fake_train_count[1] + fake_train_count[2]; svm_prob.y = new double[svm_prob.l]; svm_prob.x = new svm_node*[svm_prob.l]; svm_param.svm_type = C_SVC; svm_param.kernel_type = LINEAR; //svm_param.degree = 3; //svm_param.gamma = 0; //svm_param.coef0 = 0; svm_param.cache_size = 1; svm_param.eps = 1e-3; svm_param.C = 1; svm_param.shrinking = 1; svm_param.probability = 1; svm_param.nr_weight = NULL; svm_param.weight_label = NULL; svm_param.weight = NULL; // LBP n=8 mapping int mapping; vector mapping_r8; ifstream Mapping_r8_file; Mapping_r8_file.open(Mapping_r8_path); for(int i = 0; i < 256; i++) { Mapping_r8_file >> mapping; mapping_r8.push_back(mapping); } // LBP n=16 mapping vector mapping_r16; ifstream Mapping_r16_file; Mapping_r16_file.open(Mapping_r16_path); for(int i = 0; i < 65536; i++) { Mapping_r16_file >> mapping; mapping_r16.push_back(mapping); } // Extract Features int count = 0; for(int setIdx = 0; setIdx < 3; setIdx++) { // Real face training for(int imgIdx = 0; imgIdx < real_train_count[setIdx]; imgIdx++) { // Image Path stringstream real_train_stream; real_train_stream << setw(5) << setfill('0') << imgIdx; real_train_name = ".\\" + train_set[setIdx] + "\\train\\real\\" + real_train_stream.str() + ".png"; // Load Image Mat img = imread(real_train_name); if(img.empty()) { std::cout << "Can not load image: " << real_train_name << endl; return; } // Extract Features svm_prob.y[count] = 1; svm_prob.x[count] = Liveness_Feature(img, mapping_r8, mapping_r16, img_size, LBP_size); std::cout << "Training data: " << train_set[setIdx] << " Real " << imgIdx + 1 << endl; count++; } // Fake face training for(int imgIdx = 0; imgIdx < fake_train_count[setIdx]; imgIdx++) { // Image Path stringstream fake_train_stream; fake_train_stream << setw(5) << setfill('0') << imgIdx; fake_train_name = ".\\" + train_set[setIdx] + "\\train\\fake\\" + fake_train_stream.str() + ".png"; // Load Image Mat img = imread(fake_train_name); if(img.empty()) { std::cout << "Can not load image: " << fake_train_name << endl; return; } // Extract Features svm_prob.y[count] = -1; svm_prob.x[count] = Liveness_Feature(img, mapping_r8, mapping_r16, img_size, LBP_size); std::cout << "Training data: " << train_set[setIdx] << " Fake " << imgIdx + 1 << endl; count++; } } // Scaling ofstream minmax_file; minmax_file.open(minmax_path); for(int Feature_Idx = 0; Feature_Idx < fea_size; Feature_Idx++) { double Max = 0; double Min = 4294967296; // Get Max and Min for(int train_Idx = 0; train_Idx < svm_prob.l; train_Idx++) { Max = Max > svm_prob.x[train_Idx][Feature_Idx].value ? Max : svm_prob.x[train_Idx][Feature_Idx].value; Min = Min < svm_prob.x[train_Idx][Feature_Idx].value ? Min : svm_prob.x[train_Idx][Feature_Idx].value; } // Scaling Features for(int svm_train_Idx = 0; svm_train_Idx < svm_prob.l; svm_train_Idx++) { svm_prob.x[svm_train_Idx][Feature_Idx].value = (svm_prob.x[svm_train_Idx][Feature_Idx].value - Min) / (Max - Min); } // Save Max and Min minmax_file << Max << ' ' << Min << endl; } // Training svm_model* svm_model = svm_train(&svm_prob, &svm_param); // Count correct rate int test_count = 0; for(int test_Idx = 0; test_Idx < svm_prob.l; test_Idx++) { double value = svm_predict(svm_model, svm_prob.x[test_Idx]); test_count += (value == svm_prob.y[test_Idx]); } cout << "Correct rate: " << (double) test_count / (svm_prob.l) << endl; // Free svm_save_model(svm_path, svm_model); svm_free_and_destroy_model(&svm_model); delete[] svm_prob.x; delete[] svm_prob.y; svm_destroy_param(&svm_param); return; } void Test() { ThuVisionFaceLiveCheck liveness_test; bool Init_message = liveness_test.Init(); if(Init_message == false) { std::cout << "Initialization failed. " << endl; return; } std::cout << "Initialized successfully. " << endl; // Test data set int real_test_count[] = {3362, 29562, 9966}; int fake_test_count[] = {5761, 18636, 31683}; string test_set[] = {"NUAA", "PRINT-ATTACK", "CASIA"}; string real_test_name; string fake_test_name; vector real_test_value[3]; vector fake_test_value[3]; // Testing for(int setIdx = 0; setIdx < 3; setIdx++) { // Real face testing for(int imgIdx = 0; imgIdx < real_test_count[setIdx]; imgIdx++) { // Image Path stringstream real_test_stream; real_test_stream << setw(5) << setfill('0') << imgIdx; real_test_name = ".\\" + test_set[setIdx] + "\\test\\real\\" + real_test_stream.str() + ".png"; // Predict double value = liveness_test.Check(real_test_name); real_test_value[setIdx].push_back(value); std::cout << "Testing data: " << test_set[setIdx] << " Real " << imgIdx + 1 << "; " << "Predict Value: " << value << "; " << "True Label: 1. " << endl; } // Fake face testing for(int imgIdx = 0; imgIdx < fake_test_count[setIdx]; imgIdx++) { // Image Path stringstream fake_test_stream; fake_test_stream << setw(5) << setfill('0') << imgIdx; fake_test_name = ".\\" + test_set[setIdx] + "\\test\\fake\\" + fake_test_stream.str() + ".png"; // Predict double value = liveness_test.Check(fake_test_name); fake_test_value[setIdx].push_back(value); std::cout << "Testing data: " << test_set[setIdx] << " Fake " << imgIdx + 1 << "; " << "Predict Value: " << value << "; " << "True Label: 0. " << endl; } } // Result ofstream count_file[3]; int correct_count; int* test_count = new int[3]; for(int setIdx = 0; setIdx < 3; setIdx++) { count_file[setIdx].open("count_" + test_set[setIdx] + ".txt"); test_count[setIdx] = real_test_count[setIdx] + fake_test_count[setIdx]; for(double k = 0; k <= 1; k+=0.01) { correct_count = 0; for(int i = 0; i < real_test_value[setIdx].size(); i++) correct_count += (real_test_value[setIdx][i] >= k); for(int i = 0; i < fake_test_value[setIdx].size(); i++) correct_count += (fake_test_value[setIdx][i] < k ); count_file[setIdx] << "k on " << test_set[setIdx] << ": " << k << endl; count_file[setIdx] << "Total data on " << test_set[setIdx] << ": " << test_count[setIdx] << endl; count_file[setIdx] << "Correct data on " << test_set[setIdx] << ": " << correct_count << endl; count_file[setIdx] << "Correct rate on " << test_set[setIdx] << ": " << (double) correct_count / test_count[setIdx] << endl; } } return; } ================================================ FILE: C++/liveness.h ================================================ #include #include #include #include #include #include #include ".\libsvm-3.19\svm.h" #include ".\lbp\lbp.hpp" #include ".\lbp\histogram.hpp" using namespace std; using namespace cv; // Sigmoid double sigmoid(double input); // DoG Features Mat DoG(Mat input, double sigma1 = 0.5, double sigma2 = 1); // LBP Features Mat LBP(Mat input, vector mapping_r8, vector mapping_r16); // Extract Features svm_node* Liveness_Feature(Mat img, vector mapping_r8, vector mapping_r16, int img_size, int LBP_size); // Predict double Liveness_Predict(Mat img, svm_model* model, double* Feature_Max, double* Feature_Min, vector mapping_r8, vector mapping_r16, int img_size, int LBP_size); // Liveness Detection Class class ThuVisionFaceLiveCheck{ public: // Initialization: successful - true; failed - false bool Init(); // Liveness Predict: input image path or Mat. double Check(std::string imgPath); double Check(cv::Mat img); private: // Image size (DoG feature size = img_size * img_size) int img_size; // LBP feature size int LBP_size; // SVM Model svm_model* model; // Min and Max (for scaling) double* Feature_Max; double* Feature_Min; // LBP mapping vector mapping_r8; vector mapping_r16; }; // Training void Train(); // Testing void Test(); ================================================ FILE: C++/svm_minmax_NUAA.txt ================================================ 4638 186 2292.61 0.258032 1968.03 0.0429906 1056.06 0.0884837 2106.64 0.168737 814.024 0.120735 1285.34 0.0165767 748.185 0.00170226 844.288 0.0834991 574.271 0.0353163 803.612 0.0325523 643.701 0.00572559 742.611 0.0302885 704.634 0.0885741 865.697 0.0245662 818.328 6.21725e-015 541.139 0.00862197 675.26 0.00923781 610.372 0.0268034 565.88 0.000325988 715.587 0.0847821 560.933 0.0062252 876.012 0.0324584 678.649 0.0121225 686.271 0.0135724 595.999 0.0301275 701.879 0.00912817 498 0.0122942 698.358 0.00511841 544.79 0.00583248 572.791 0.00293929 623 0 402 0 598.563 0.0133827 519.585 0.00705574 540.404 0.00250907 515.277 0.0203501 454.082 0.00123163 436.233 0.00668602 477.899 0.00114529 362.275 0.0183693 308.319 0.000746276 473.772 0.0128237 345.295 0.00651096 362.67 0.00298229 386.227 0.0299721 354.025 0.0127712 461.863 8.88178e-016 286.123 0.0121933 279.589 0.0347225 287.342 0.0131526 266.558 0.00168677 261.494 0.0094623 270.138 0.0233686 217.855 0.0465949 250.662 0.0586835 190.437 0.00332815 287.271 0.0090122 181.854 0.0142805 321.398 0.00207759 222.81 0.0178291 367.611 0.00210843 175.399 0.00537264 493 0 1191.26 0.0132862 1272.52 0.534385 1027.92 0.197807 1150.38 0.0308084 1442.69 0.710015 901.662 0.00559385 1053.75 0.0266603 982.157 0.0969134 861.551 0.00694012 706.16 0.00404798 887.749 0.0763378 917.746 0.0139738 684.177 0.0612228 639.437 0.00550469 735.161 0.00894135 803.885 0.0138206 681.999 0.0244332 600.548 0.013805 782.932 0.0200553 429.771 0.00947661 592.997 0.0029203 461.528 0.144719 646.107 0.0240248 418.455 0.026494 458.802 0.00240852 442.052 0.0161637 511.063 0.0530391 472.054 0.0373713 490.098 0.00491298 566.848 0.0233287 587.677 0.0151435 454.53 0.029391 572.913 0.0187844 381.813 0.0275307 399.031 0.00993181 367.964 0.0135449 372.675 0.0214892 538.768 0.0292419 505.79 0.0115374 558.371 0.0127384 419.524 0.00796698 503.93 0.00292722 542.759 0.0312349 466.166 0.00495845 452.066 0.0243236 328.651 0.0229813 402.096 0.0129765 336.259 0.00636526 390.83 0.0100214 339.709 0.0102316 437.798 0.00726407 306.812 0.00792195 329.633 0.00263265 361.918 0.00608831 368.935 0.0243964 269.51 0.00461483 343.242 0.0108465 243.192 0.0272887 213.837 9.45839e-005 270.461 0.000843973 241.703 0.0138016 256.421 0.000354027 228.683 0.00150489 273.223 0.000966426 1255.62 0.0727434 1100.56 0.0537289 903.181 0.0828493 776.817 0.000661446 966.542 0.135085 809.154 0.109499 624.316 0.082965 749.833 0.0363108 828.803 0.0794155 635.865 0.0482245 931.019 0.0283288 840.368 0.0196538 607.907 0.00296418 580.334 0.112362 559.817 0.147965 541.093 0.00536489 683.111 0.0256236 496.128 0.0937267 494.912 0.00267068 471.192 0.00175061 429.896 0.00650188 449.279 0.00390718 454.233 0.00620899 449.279 0.0239917 468.357 0.0206665 430.127 0.0363543 432.361 0.0185265 431.108 0.020497 509.963 0.0176186 455.382 0.00615107 425.749 0.0143736 459.278 0.00782328 531.453 0.00820711 387.278 0.0208447 666.226 0.0242608 490.683 0.0214072 629.575 0.00615557 480.968 0.0129884 595.965 0.0136598 456.217 0.024403 370.487 0.00750192 267.374 0.00623814 397.787 0.00449583 477 0.011655 370.061 0.00373504 320.224 0.00319924 367.329 0.0194477 432.823 0.0103622 261.002 0.00984015 300.032 0.000807762 317.769 0.0139045 301.103 0.000416534 276.367 0.0126043 406.312 0.00660743 252.666 0.00385511 376.192 0.0301101 222.33 0.0232183 273.377 0.00373185 343.889 0.00713145 263.738 0.00995165 403.621 0.0046526 282.603 0.00584146 363.619 0.0036613 227.406 0.0197452 1640.21 0.132571 722.763 0.122084 990.83 0.065559 805.847 0.0436376 753.1 0.0495231 479.096 0.0569496 740.235 0.00308668 633.875 0.00887367 552.75 0.042442 646.946 0.0548192 478.904 0.0485743 508.171 0.0427687 697.427 0.00264661 619.659 0.0123616 648.415 0.0118865 537.915 0.00734329 456.086 0.00852339 523.654 0.00316749 620.368 0.000245148 455.493 0.0387759 410.356 0.0307251 449.886 0.0313531 427.101 0.0107647 391.424 0.0558898 380.502 0.0498883 457.903 0.0188219 560.479 0.000388067 439.922 0.0110602 362.369 0.00428629 396.31 0.0107113 383.09 0.00160793 367.179 0.00999502 414.61 0.00484781 478.148 0.00928183 416.203 0.00669265 330.647 0.00346521 279.461 0.00226358 338.656 0.000528617 305.376 0.00373747 253.129 0.000763232 257.122 0.00917065 390.278 0.00259718 314.599 0.0207473 331.422 0.00119396 288.857 0.000947032 343.541 0.0198409 298.489 0.00622538 250.826 0.0137948 238.008 0.00186629 307.772 0.0639878 205.343 0.00331676 257.375 0.00866105 227.442 0.00405915 255.746 0.000996362 230.452 0.0737804 219.794 0.00685649 270.586 0.00934284 186.194 0.0085002 229.35 0.00523108 251.875 0.00362591 262.192 0.0354053 257.757 0.00168949 281.937 0.0161841 325.867 0.00893534 1440.7 0.0493222 757.073 0.0340349 628.744 0.18866 709.967 0.00938141 718.138 0.020334 571.921 0.0263652 613.958 0.0138249 663.748 0.0845945 503.802 0.0198822 663.536 0.00722288 502.657 0.0247267 561.044 0.0137579 529.707 0.0437586 501.141 0.0399298 567.409 0.0138549 573.914 0.0360973 581.831 0.0655676 625.943 0.00494519 551.08 0.0517938 485.526 0.0352965 554.985 0.00557072 621.947 0.0179256 431.818 0.0419553 442.927 0.0274282 413.022 0.0438075 334.606 0.0128968 449.513 0.071765 355.823 0.0130854 344.05 0.00532927 460.85 0.00802145 292.53 0.00735568 379.189 0.0147083 395.3 0.00252128 399.84 0.00366313 369.003 0.0266241 280.349 0.0120607 344.016 0.012053 344.18 0.0570188 255.704 0.0106002 257.373 0.014672 258.842 0.00993619 265.773 0.034679 254.952 0.0205942 240.952 0.00608497 208.36 0.00130549 279.619 0.00142747 244.542 0.0201925 242.114 0.0012693 258.541 0.00714668 183.148 0.00549695 238.453 0.0119491 204.33 0.00342101 218.185 0.0169233 212.844 0.0165412 246.974 0.0102653 198.999 0.00271908 193.838 0.0105552 185.461 0.0192424 222.376 0.0162523 208.189 0.00216341 215.107 0.0113122 219.601 0.00178331 177.656 0.0148194 275.611 0.068843 780.137 0.0596555 699.994 0.0173279 617.54 0.0702795 867.475 0.0376144 797.563 0.197515 602.045 0.0201447 611.959 0.00553249 641.916 0.229798 724.708 0.0270652 638.359 0.037588 537.113 0.0333842 438.848 0.027168 493.381 0.0615987 563.725 0.0220584 623.804 0.0851137 677.967 0.131888 779.866 0.0122134 496.186 0.0144989 600.538 0.0197237 472.319 0.00641686 526.274 0.0143642 487.433 0.0673951 492.439 0.0230945 476.76 0.00302257 372.148 0.00398936 480.136 0.00602851 324.562 0.00280523 400.205 0.011406 381.157 0.0328635 293.869 0.00145467 304.621 0.00656718 279.046 0.0142855 285.744 0.0158958 328.707 0.0156746 298.238 0.000608692 299.382 0.0372867 255.023 0.0157539 322.713 0.0124566 286.233 0.00850505 330.579 0.0582298 210.516 0.0139116 281.059 0.0325826 257.73 0.0345326 265.689 0.0014341 291.329 0.000192702 259.306 0.010315 270.352 0.00273505 223.833 0.00651605 234.593 0.00689698 209.777 0.00520375 234.021 0.0248795 230.832 0.00700281 186.009 0.00479342 215.325 0.00883306 172.211 0.00787606 171.061 0.0344103 250.449 0.00388549 224.621 0.00307069 180.096 0.00828193 174.78 0.00413204 207.899 0.0388119 169.403 0.0116287 173.233 0.0229973 248.831 0.00816905 886.566 0.0406534 638.313 0.0112496 632.87 0.00416263 580.809 0.0589929 887.519 0.00927245 535.674 0.252007 621.415 0.00746439 697.931 0.00894357 672.498 0.0558532 524.265 0.000429605 500.814 0.051768 486.462 0.0458626 437.984 0.00658947 542.924 0.115029 632.608 0.0244561 485.868 0.0160883 457.834 0.0994676 490.01 0.0182187 445.043 0.0509663 501.614 0.0137698 437.329 0.0114546 494.816 0.0567037 528.345 0.0171306 436.157 0.0119338 467.823 0.0152752 447.428 0.0167352 361.283 0.0152427 356.478 0.0225472 361.976 0.00691573 320.488 0.000689988 394.195 0.00312927 288.809 0.00961029 314.581 0.0309721 307.499 0.0462257 263.478 0.0203871 319.601 0.00464118 278.019 0.0212052 281.659 0.00157834 301.611 0.00284802 272.549 0.00106111 237.11 0.0103515 311.811 0.00271541 284.927 0.00114032 266.044 0.00954874 220.524 0.0120683 254.3 0.00130736 250.099 0.00565345 221.311 0.000401597 214.121 0.000492644 221.879 0.0162612 224.986 0.00515991 183.394 0.0289187 211.761 0.00246625 159.109 0.00650098 187.054 0.00459205 189.879 0.019107 263.816 0.0420695 207.337 0.0154198 195.482 0.0227388 208.437 0.0193973 159.579 0.0041315 198.664 0.000779011 178.935 0.00501289 237.876 0.0062234 1312.76 0.0128697 810.686 0.13632 950.86 0.162369 799.131 0.0696833 935.098 0.019626 435.478 0.00180704 643.709 0.0500153 542.519 0.0309342 478.914 0.0592094 470.604 0.0963666 496.853 0.0132806 610.658 0.0368446 490.725 0.0666337 520.744 0.0256029 496.738 0.00278224 445.985 0.00262883 436.001 0.0488392 530.377 0.018393 437.573 0.0633349 465.303 0.016024 463.984 0.0714806 476.664 0.00345176 426.106 0.00318597 414.457 0.0396652 455.299 0.0242992 361.494 0.0119915 435.544 0.00254752 353.957 0.0422888 350.209 0.00528273 307.933 0.00454534 324.959 0.00532537 327.932 0.0377839 317.648 0.00800579 298.341 0.00458976 290.194 0.00582124 251.978 0.00563544 324.299 0.013745 296.635 0.0379007 268.39 0.0187713 238.409 0.019234 238.586 0.0257409 270.718 0.00758231 217.836 0.000908456 271.513 0.0134114 208.236 0.0104568 206.255 0.0413205 181.917 0.0107658 256.087 0.0131974 185.115 0.00129049 201.838 0.000739494 242.559 0.0106154 204.632 0.00199428 200.943 0.0190009 194.321 0.023882 176.4 0.0135134 174.748 0.00430499 168.817 0.0105613 181.689 0.00722373 175.094 0.00175579 169.327 0.00540145 183.694 0.00226151 178.153 0.000130526 191.858 0.0133038 260.634 0.00605769 1004.87 0.488064 825.048 0.0729063 857.606 0.159203 710.738 0.00563896 986.656 0.0135068 560.569 0.035051 597.404 0.143727 746.865 0.00775507 549.977 0.0324632 510.476 0.0188016 477.584 0.0436527 508.569 0.0356127 544.028 0.0182946 419.973 0.00368945 449.465 0.117749 490.345 0 511.366 0.0294373 410.746 0.1625 437.482 0.0954769 433.335 0.0151438 418.837 0.011256 419.321 0.0347788 409.712 0.0601338 424.153 0.0619666 413.533 0.0263254 382.876 0.0364199 400.152 0.00564688 344.638 0.00691178 350.904 0.0256278 352.536 0.0163868 336.662 0.000600316 370.182 0 249.421 0.0208153 297.733 0.0131185 301.913 0.00414217 345.262 0.00578713 336.561 0.00817469 244.996 0.0136825 254.406 0.00689602 208.518 0.0218947 262.104 0.00150889 230.057 0.004154 264.366 0.0210725 190.753 0.023388 253.381 0.0111895 204.829 0.00196606 226.051 0.00302824 206.53 0 220.338 0.00862197 205.191 0.023511 252.584 0.00832025 200.282 0.0171891 194.413 0.00528203 151.835 0.000596075 189.399 0.0257673 157.156 0.0131407 180.868 0.00592646 199.301 0.000359288 196.747 0.0125198 176.58 0.00121978 187.18 0.0041575 188.943 0.00792582 147.904 0.00188737 204.616 0.00947911 1218.49 0.0133147 796.408 0.0131225 922.232 0.012003 995.895 0.102706 1007.59 0.0815763 973.471 0.0134424 838.709 0.082816 929.165 0.00658016 568.897 0.00876938 544.105 0.0230912 622.181 0.110535 568.47 0.0322394 519.063 0.0457494 507.605 0.0479848 627.443 0.0242485 398.653 0.0115916 450.397 0.0157299 448.48 0.0313163 441.128 0.062877 385.977 0.021853 372.619 0.00508895 374.864 0.00771593 409.33 0.0488965 392.06 0.00473102 401.769 0.0650026 358.904 0.0379418 422.877 0.0564785 344.25 0.0149906 328.328 0.00576113 365.934 0.00601613 344.761 0.0164361 363.668 0.00301101 351.281 0.0273031 310.324 0.00412046 296.982 0.0107577 281.544 2.57204e-005 239.294 0.0469302 259.001 0.00735718 318.359 0.00481453 235.938 0.0170581 286.71 0.00266075 253.835 0.0607267 212.429 0.0231415 189.435 0.0202806 229.846 0.00421727 301.38 0.00214588 209.215 0.00892544 226.755 0.00263731 185.761 0.0272977 189.286 0.0384934 209.145 0.0113176 194.25 0.0106572 180.48 0.000226084 195.663 0.0103094 171.266 0.00556771 245.946 0.00876436 207.818 0.0109711 228.517 0.00761149 160.694 0.0168468 167.771 0.0116276 148.666 0.00266782 236.123 0.00479453 147.642 9.66406e-005 175.923 0.0376264 1372.45 0.0688802 781.147 0.0498678 647.995 0.114334 885.835 0.0278703 859.213 0.0200285 841.641 0.00610925 795.986 0.0228158 535.776 0.00089108 641.11 0.0507355 592.455 0.00110148 538.249 0.000714014 557.64 0.0332788 454.418 0.0119264 412.62 0.0163935 486.268 0.0420817 416.485 0.0240103 501.322 0.0249774 369.052 0.130187 446.038 0.0553453 377.56 0.037791 375.584 0.0428642 385.112 0.0299576 398.906 0.0603655 340.801 0.0434097 394.196 0.00473168 398.356 0.0435559 323.554 0.0431413 343.144 0.00343671 339.171 0.0382026 330.279 0.00761199 345.799 0.0239973 324.13 0.0128746 304.183 0.0640834 261.049 0.000964929 320.141 0.00623427 287.117 0.0172366 258.609 0.00900628 264.611 0.00183942 233.861 0.0196949 221.021 0.0110746 255.341 0.0180585 263.16 0.0267308 231.23 0.0216207 249.053 0.0379785 217.1 0.00667422 253.659 0.0208645 245.374 0.0090496 193.91 0.00488763 290.06 0.00100218 209.313 0.00338291 171.387 0.00908013 180.944 0.0176125 180.356 0.0223481 157.296 0.00987173 173.092 0.00159479 161.938 0.00753154 195.821 0.00271022 187.63 0.00747216 213.373 0.000417325 177.693 0.0170065 142.361 0.00330763 186.414 2.22877e-005 150.828 0.0116914 203.113 0.00270702 1183.21 0.00284046 789.256 0.00430291 865.974 0.108858 796.881 0.0153261 807.495 0.105319 626.176 0.0304201 649.466 0.0299184 721.442 0.0450185 656.578 0.0283945 521.003 0.0100424 534.405 0.00268475 505.939 0.05191 514.238 0.000321863 443.328 0.0179879 520.46 0.0601801 392.513 0.0520324 376.353 0.0179581 438.025 0.0615352 342.996 0.00614174 420.545 0.0507134 344.63 0.0247192 429.618 0.00719914 414.515 0.014726 382.796 0.0205614 355.04 0.0269288 401.59 0.0098668 388.658 0.0182762 367.048 0.00047404 343.821 0.00207849 367.311 0.0491386 351.788 0.00383876 272.058 6.47363e-005 289.329 0.000992799 259.867 0.00574819 312.671 0.00403759 290.731 0.0270517 284.844 0.0124866 272.512 0.00908418 280.375 0.021713 240.237 0.000322021 253.311 0.00771112 210.723 0.0353157 234.008 0.00473687 207.183 0.0060558 213.444 0.00299069 172.568 0.00736968 177.31 0.0312765 207.799 0.0151233 174.205 0.0100615 179.654 0.002764 163.207 0.00380754 165.536 0.00746979 149.81 0.00836258 153.117 0.010897 183.323 0.00579208 150.323 0.0190107 173.508 0.000830714 144.242 9.95809e-005 169.136 0.00508633 164.234 0.0262662 168.001 0.00314081 163.074 0.000990893 194.768 0.000866039 216.83 0.0114548 1043.97 0.047412 844.681 0.0215442 888.753 0.0182805 1065.63 0.0872829 915.753 0.00659901 650.729 0.00520247 539.735 0.0506084 685.664 0.0402993 656.17 0.0978621 465.851 0.0360456 471.108 0.0824067 414.812 0.109196 373.379 0.103195 465.594 0.00618119 433.78 0.0472414 377.403 0.00977416 346.467 0.0436379 366.799 0.0255638 375.792 3.88909e-005 308.124 0.0575353 316.864 0.00970081 363.097 0.0135907 363.872 0.0154353 426.755 0.0314373 373.535 0.00079864 359.449 0.000277789 383.238 0.04103 323.061 0.0155659 370.351 0.100771 314.718 0.0476902 329.324 0.00214327 287.447 0.0350946 303.212 0.00052088 273.473 0.00311099 265.681 0.00492154 257.66 0.00951338 284.241 0.0026087 262.733 0.00219536 278.527 0.00941731 246.208 0.0246171 243.412 0.00255761 213.599 0.0428965 212.604 0.000244867 190.046 0.00631955 218.216 0.0122307 169.421 0.0246572 207.989 0.0140551 167.256 0.0186569 171.554 0.00360955 158.414 0.0073474 205.195 0.0169953 194.637 0.0353738 150.644 0.016362 183.814 0.00229342 153.92 0.00686781 151.895 0.0093702 153.048 0.00380513 226.233 0.00998915 150.236 0.00981295 192.941 0.00306985 151.575 0.00713192 163.941 0.00415667 151.264 0.00132603 160.395 0.00464289 1172.11 0.0369811 962.054 0.00850806 915.938 0.041668 946.502 0.151234 915.704 0.00593401 601.166 0.0403542 529.186 0.00255239 557.725 0.0651595 507.916 0.0201692 557.916 0.0875186 462.823 0.0679427 466.129 0.0518698 467.426 0.021492 503.413 0.012907 373.008 0.0813309 407.188 0.0368384 410.184 0.0135508 394.89 0.0362479 394.461 0.0248081 327.618 0.000217996 324.763 0.0144604 270.337 0.0155431 348.887 0.0236064 395.593 0.0335841 330.555 0.00656011 308.551 0.0197274 275.617 0.032734 298.292 0.0173268 306.928 0.000125058 288.629 0.00189019 294.71 0.0185168 264.345 0.00707288 283.928 0.0416141 231.817 0.00309802 294.206 0.020248 259.619 0.0120529 263.727 0.00300092 232.793 0.0341519 223.145 0.000486681 216.552 0.00322999 239.307 0.0361965 215.045 0.00108625 202.531 0.00952396 214.775 0.0109529 193.771 0.00256711 166.455 0.011008 189.518 0.00419746 167.964 0.0160467 206.184 0.00741664 173.386 0.0106826 208.743 0.0131182 165.508 0.00484359 175.033 0.0285204 177.648 0.0139417 153.118 0.012507 156.062 0.0095676 171.175 0.030527 159.935 0.0406691 184.534 0.00712874 149.679 0.00055582 160.713 9.14027e-005 137.028 0.00359163 178.097 0.0088684 165.612 0.00464831 1072.41 0.186927 907.385 0.043115 880.723 0.102422 778.259 0.0103338 1055.18 0.0955651 668.294 0.0665592 684.008 0.0015098 627.636 0.0278179 480.617 0.00676326 510.05 0.0598459 507.827 0.0201249 431.623 0.0539181 461.168 0.0293618 402.11 0.0244759 371.91 0.0718006 427.851 0.0030381 343.803 0.0154507 346.444 0.00362184 399.177 0.00613637 313.187 0.0197935 372.562 0.0390484 291.427 0.0805942 336.63 0.0201896 289.387 0.0071158 341.103 0.00851063 339.943 0.0392215 334.065 0.0452933 300.66 0.00460515 269.858 0.0222587 235.247 0.00179692 289.968 0.0436365 255.503 0.0117649 263.377 0.0194048 244.118 0.0294814 373.234 0.0120543 236.792 0.0171343 215.933 0.0247962 218.197 0.00134187 234.109 0.0206231 186.791 0.02565 217.933 0.0102919 208.361 0.000145189 180.033 0.0107053 171.131 0.0206364 193.821 0.0074508 202.141 0.0159166 236.641 0.0164718 148.125 0.00333548 153.372 0.0109219 152.068 0.00400518 154.409 0.000938875 149.111 0.0130139 166.086 0.0104366 200.19 0.0233706 165.032 0.00441456 171.838 0.00534525 148.443 0.0153091 140.103 0.0010295 159.293 0.0157056 150.572 0.000521582 178.741 0.016501 149.533 0.0217056 171.151 0.0162687 196.862 0.00846543 1406.73 0.0710678 838.04 0.0464442 762.512 0.0156526 571.131 0.0334829 775.698 0.0988375 659.337 0.010053 770.962 0.0448717 514.056 0.046741 506.447 0.00935677 549.609 0.0114489 512.273 0.00694931 434.941 0.000907881 389.678 0.0317639 325.065 0.00766098 389.675 0.0248351 344.841 0.0616618 324.647 0.0609445 375.052 0.0453313 346.263 0.000845515 306.98 0.00140248 277.877 0.0121571 289.491 0.0242226 280.51 0.00391418 278.179 0.00847973 263.244 0.00483333 294.344 0.0273841 309.769 0.000279817 253.955 0.00592002 260.181 0.0133259 260.819 0.0106753 259.07 0.0214017 290.651 0.015125 224.946 0.0327696 233.537 0.0110893 215.586 0.00597953 254.594 0.0208394 200.543 0.00304657 194.159 0.0220582 227.668 0.0143708 246.995 0.00908165 204.216 3.95982e-005 236.059 0.00674788 195.246 0.00689312 221.814 0.03178 201.925 0.0230913 199.07 0.0263735 184.93 0.00334786 193.479 0.00390789 186.221 0.0289831 255.35 0.00440218 168.743 0.00300861 156.478 0.0268462 148.615 0.0037224 150.562 0.00836448 142.886 0.0117405 197.402 0.00677026 171.76 0.00205394 174.736 0.000987378 174.54 0.011404 134.15 0.00825636 164.934 0.0255316 142.601 0.00371993 145.624 0.00297494 153.711 0 1333.38 0.0796898 846.133 0.0257432 772.643 0.0718752 623.112 0.0548283 580.251 0.0412607 551.415 0.0468356 671.37 0.0651945 626.766 0.00709808 632.199 0.065961 392.071 0.066734 389.014 0.00862296 328.136 0.00977224 396.293 0.00724667 302.145 0.00845397 328.252 0.0891562 333.957 0.0208153 317.078 0.0502525 329.423 0.0224944 345.882 0.00378494 349.387 0.0207379 362.998 0.0144307 293.778 0.0090864 336.487 0.0426708 338.096 0.0045424 317.484 0.0164816 243.169 0.0224296 262.046 0.00257415 222.071 0.00589161 233.626 0.0100488 256.267 0.0242381 213.559 0.00629152 281 0 241 0 285.695 0.00522802 261.401 0.0219857 242.245 0.0114675 241.96 0.0100314 250.634 0.0205188 211.929 0.00264272 230.773 0.00631239 179.886 0.00225256 193.653 0.00193851 180.4 0.0153289 185.505 0.0226095 203.153 0.0154737 165.883 0.00169893 181.298 0.0106413 176.77 0.00862197 213.518 4.44089e-016 156.262 0.0140281 133.997 0.00615716 155.824 0.012216 153.693 0.000298796 160.74 0.0013457 184.741 0.00110125 161.747 0.00382769 127.467 0.00351242 126.922 0.00342696 135.735 0.00560428 159.026 0.00350745 232.483 0.00418529 136.866 0.00361822 166.046 0.00257949 156.861 0 1314.03 0.0666499 705.807 0.029533 957.768 0.0129098 971.255 0.0298442 839.736 0.0275717 582.148 0.000388924 664.765 0.0580522 546.168 0.0279763 574.333 0.00118732 418.317 0.0202375 442.919 0.0179866 356.114 0.0097267 346.455 0.0109189 366.581 0.0108419 366.123 0.0287035 369.412 0.0270151 428.991 0.0108276 356.41 0.0366954 328.424 0.0215469 302.824 0.001569 331.716 0.0252946 267.202 0.00109689 293.927 0.000515047 317.284 0.0941225 280.793 0.0242778 236.792 0.000167187 266.357 0.00421987 254.464 0.0262808 226.624 6.06064e-005 246.743 0.016845 256.05 0.00578438 267.118 0.0137985 251.6 0.00875541 265.955 0.0230543 228.104 0.00884064 234.113 0.00470376 223.509 0.00147727 237.636 0.0267594 214.899 0.00506343 217.706 0.0235263 221.014 0.00423493 196.505 0.000486696 215.198 0.00978295 206.132 0.0266577 186.998 0.0239977 187.323 0.0187427 199.1 0.00229537 170.68 0.00268559 141.805 0.012134 158.045 0.0106451 169.062 0.00313013 136.947 0.00813011 156.424 0.0282216 143.99 0.000138413 133.495 0.0221919 139.76 0.00734815 136.571 0.0100031 135.082 0.00200586 143.106 0.0146224 127.919 0.00156977 147.569 0.00346334 163.531 0.0063104 202.503 0.0161732 182.467 0.0132478 1278.72 0.0456354 1027.58 0.0203601 979.198 0.00319397 698.894 0.084148 720.099 0.000671354 588.915 0.0295727 704.911 0.0374246 451.194 0.0785564 591.554 0.0428468 527.562 0.101089 436.377 0.00470317 370.554 0.0270299 390.03 0.000123115 334.976 0.00821951 337.477 0.0246948 377.346 0.0140247 363.014 0.0278535 299.44 0.0155624 314.209 0.00876193 294.357 0.024513 244.756 0.00135285 287.651 0.00425338 296.59 0.0348295 283.544 0.0176009 279.855 0.0325887 288.982 0.0135346 200.289 0.00193693 235.072 0.0277899 198.892 0.00307014 195.726 0.0287164 219.849 0.0501834 275.435 0.000936074 230.26 0.00858149 214.06 0.0239326 206.209 0.000822165 218.343 0.00878192 188.827 0.00279732 215.541 0.0194789 201.466 0.011076 180.938 0.010799 205.913 0.000901691 207.87 0.00476798 231.396 0.000307093 191.181 0.00848565 172.358 7.98015e-005 187.167 0.000214962 169.874 0.019944 172.236 0.00358803 171.256 0.0152468 138.244 0.000525441 170.326 0.00099697 161.943 0.00532483 137.24 0.000464351 135.691 0.0122565 141.249 0.00190559 131.078 0.0025142 136.109 0.0049186 157.32 0.00105144 130.299 0.00164288 139.582 0.00291231 115.507 0.00281367 114.321 0.000493578 128.489 0.0375219 174.067 0.0333371 1429.32 0.0184414 789.672 0.0201514 787.132 0.0377345 672.605 0.00343704 531.436 0.00501213 611.265 0.0427021 456.999 0.0215649 549.749 0.0113177 555.555 0.0366531 560.987 0.0221344 543.999 0.0151436 374.862 0.0190842 413.391 0.000880371 321.153 0.0227532 320.329 0.0509003 330.901 0.0864208 353.819 0.0101678 279.642 0.00893508 250.81 0.0419779 309.411 0.00215248 362.082 0.0188667 318.006 0.0191614 217.261 0.0189799 275.447 0.00584579 231.563 0.0192595 260.184 0.0115069 206.948 0.0107608 222.041 0.0675565 200.49 0.0219985 183.702 0.0134755 205.476 0.00823949 196.237 0.00384684 237.628 0.0085356 224.671 0.0198579 221.584 0.0437772 219.172 0.00593457 186.069 0.0218772 195.637 0.0203219 181.268 0.00548033 165.68 0.00958235 169.865 0.0128819 177.302 7.1287e-006 174.791 0.00268728 170.857 0.00401971 201.941 0.00910717 180.719 0.00780353 179.586 0.00219294 173.401 0.00855704 169.552 0.000261073 166.459 0.00181086 204.449 0.00131063 121.208 0.00105282 148.345 0.00586915 134.511 0.00735347 137.668 0.00710554 138.348 0.00846497 146.563 0.000591274 138.696 0.0161714 128.774 0.000787918 148.858 0.013365 122.456 0.0115628 135.512 0.00988229 142.456 0.0013474 172.703 0.000314986 1106.34 0.0113791 541.172 0.0106719 676.57 0.0316254 608.201 0.0154421 534.517 0.011217 501.76 0.0603644 631.004 0.0146446 459.239 0.0498598 449.528 0.0872141 477.992 0.0367039 404.972 0.0130843 333.74 0.010626 316.295 0.0045949 342.756 0.0561706 354.919 0.000531511 269.679 0.00502421 304.473 0.00742646 312.067 0.0408501 265.748 0.0322947 281.7 0.0069685 274.012 0.0195528 303.082 0.0212263 297.671 0.0116987 204.258 0.0317353 208.573 0.0817034 215.424 0.0192981 210.251 0.0207808 248.395 0.000601307 200.323 0.00736739 179.126 0.00896414 188.243 0.0173725 212.566 0.00502697 192.216 0.00768128 208.301 0.00885702 187.028 0.00341774 178.828 0.0135796 161.137 0.00276958 171.621 0.000606662 177.156 0.00177049 240.175 0.00955566 206.909 0.00253491 166.42 0.0162876 171.535 0.0042485 163.268 0.00476602 206.516 0.0197684 168.735 0.0155681 157.878 0.0286275 188.436 0.00767129 144.687 0.00187438 146.24 0.00539411 162.61 0.00360048 135.714 0.000499545 186.054 0.00581867 137.645 0.00994401 192.906 0.0097677 134.362 0.0111506 154.272 0.00174995 124.583 0.00860014 154.808 0.00163655 113.567 0.0120418 158.437 0.0022279 121.87 0.0194303 115.375 0.00778894 159.022 0.00361509 1181.03 0.078366 725.122 0.0179455 589.995 0.025796 706.596 0.00525339 601.911 0.0875597 543.16 0.0407733 551.65 0.0392025 591.702 0.0144555 474.828 0.0492147 409.152 0.0336696 429.77 0.0170063 396.718 0.00461675 425.783 0.00402888 293.389 0.0303199 416.311 0.0322256 309.699 2.9917e-005 296.082 0.0090588 351.861 0.00454158 232.536 0.0139684 234.682 0.00697639 265.129 0.00174733 261.885 0.0199239 301.86 0.022947 245.087 0.00942066 240.618 0.0404492 221.598 0.00434445 232.016 0.00288235 191.833 0.0029951 170.873 9.35898e-005 182.575 0.000205619 153.408 0.000633215 172.977 0.00110468 172.319 0.00562983 200.108 0.00221419 195.325 0.0234152 185.653 0.0155367 158.008 0.00116007 159.979 0.0299284 149.116 0.000232248 148.207 0.00150634 173.934 0.00110922 174.805 0.0196511 203.995 0.0352096 177.636 0.00939656 164.225 0.0149877 145.896 0.00752044 180.036 0.0184788 180.21 0.00888775 153.867 0.0155795 138.562 0.0108451 146.131 0.00886544 124.86 0.00188718 150.207 0.000478674 156.042 0.00325018 135.189 0.00258968 143.379 0.00252721 121.851 0.00176086 134.104 0.00265799 144.514 0.00143602 129.043 0.0110662 124.33 0.000769857 133.048 0.00174473 109.64 0.00537689 157.738 0.00556917 1305.46 0.0446132 759.214 0.0197065 802.127 0.0255419 708.734 0.111814 770.195 0.00300654 653.056 0.0229775 595.858 0.0704811 461.678 0.00911424 418.394 0.026832 352.333 0.0207569 383.462 0.0082656 347.914 0.0141112 391.959 0.000246825 392.371 0.00306071 332.178 0.0375442 351.143 0.0206669 335.808 0.00164772 288.305 0.0121431 321.414 0.0101428 223.443 0.00113816 257.827 0.0103403 305.043 0.0106282 218.458 0.0065716 203.643 0.00246133 226.472 0.00347706 247.96 0.0112946 234.111 0.0254264 181.537 0.0634687 200.547 0.0114485 155.907 0.0127635 174.85 0.0205579 167.746 0.00570823 169.742 0.00607672 154.643 0.0214159 210.08 0.00445568 150.08 0.0268666 160.438 0.0105272 154.677 0.00510441 163.082 0.00144297 159.032 0.0201595 165.447 0.00379337 165.612 0.0140195 176.358 0.0134112 167.932 0.000402721 143.669 2.23347e-005 150.083 0.0118539 146.518 0.0048693 161.529 0.0203767 134.827 0.000380012 126.586 0.00330378 128.498 0.000145634 136.193 0.0232635 126.814 0.0110751 151.937 0.00284843 149.179 0.00872386 140.33 0.0101498 127.055 0.00148372 136.337 0.00178058 116.592 0.00235091 126.696 0.00386658 117.152 0.00235598 141.423 0.00270731 102.326 0.000627191 150.162 0.0176561 1244.42 0.151169 727.394 0.0489626 769.853 0.0396642 644.11 0.00356679 667.279 0.0174973 576.458 0.0402357 587.501 0.0622226 385.946 0.0317828 419.893 0.0233665 486.165 0.0168045 512.652 0.000524124 380.167 0.0262298 355.681 0.00620837 343.404 0.0459841 317.866 0.00246384 325.021 0.00106956 352.191 0.00568995 261.238 0.00235249 271.673 0.0101932 227.841 0.00645878 222.308 0.0323319 214.035 0.00744668 181.23 0.0179098 200.597 0.0177449 196.94 0.00997604 199.362 0.0187991 203.236 0.00345404 169.847 0.00599182 186.077 0.00603368 192.566 0.00561311 176.369 0.00341623 154.814 2.45294e-005 168.216 0.00359224 147.713 0.01246 144.241 0.00547772 151.586 0.0010285 139.292 0.00949008 171.137 1.17788e-005 148.535 0.000875852 157.596 0.0102638 142.766 0.0269764 135.219 6.6686e-005 132.886 0.00878034 154.433 0.0105395 144.887 0.00656018 124.298 0.000160668 120.43 0.00338283 159.326 0.00482665 111.964 0.00134112 169.344 0.00802811 120.558 0.000902861 160.625 0.00427136 116.304 0.00396058 128.699 0.00128244 125.701 0.00173355 121.259 0.00544239 129.391 0.00129861 125.212 0.00507998 136.14 0.0209395 130.898 0.0075438 121.516 0.00323687 108.709 0.009651 153.605 0.00610425 174.194 0.0149698 1294.4 0.0220054 501.197 0.0512409 803.708 0.0141997 579.412 0.00414213 531.29 0.0148446 465.234 0.03576 488.359 0.00733448 375.768 0.025002 414.064 0.00974825 576.028 0.0060648 417.955 0.0692799 518.486 0.00596346 362.654 0.00430703 382.456 0.0115157 313.983 0.0397991 284.685 7.10543e-015 291.999 0.0208153 259.807 0.0196647 232.481 0.0102357 268.739 0.0340933 243.208 0.0182665 221.022 0.0508169 241.282 0.0172199 202.574 0.0199315 242.027 0.0039046 217.271 0.00855738 170.85 0.00150662 195.774 0.00347314 176.387 0.00845662 143.723 0.0351682 175.835 0.00570501 149.53 0 148.74 0.0294373 191.49 0.0176416 149.985 0.0243949 166.663 0.0313772 160.861 0.00856153 166.809 0.0155537 193.963 0.0186534 136.843 0.0080499 150.958 0.00793653 148.821 0.0008378 183.758 0.0415593 147.86 0.000439583 161.21 0.00335123 180.381 0.00670157 124.409 0.00665182 154.371 3.55271e-015 161.463 0.0208153 143.625 0.0046715 131.766 0.00574094 132.797 0.0037298 135.133 0.00722989 126.19 0.00231768 139.704 0.0133 115.249 0.00256588 123.32 0.012343 131.448 0.0032582 105.491 0.00626194 121.134 0.00671999 103.317 0.00371798 135.057 0.0034896 116.541 0.00686141 156.657 0.0074857 1219.51 0.0382142 710.743 0.00802268 659.508 0.0449252 479.45 0.0178489 454.024 0.0160163 588.819 0.00128414 621.487 0.0351775 649.301 0.0273071 566.052 0.00899924 369.261 0.0539344 571.626 0.0143327 334.662 0.00283466 439.814 0.0260368 343.014 0.00876364 333.276 0.0262783 391.638 0.00318469 298.736 0.00683818 263.179 0.00129726 230.028 0.0621579 234 0.00594043 232.071 0.0579025 255.436 0.0173768 219.874 0.0134016 221.559 0.00104013 227.405 0.00746084 207.934 0.00876131 220.781 0.00702353 153.633 0.0105635 154.653 0.00135686 167.392 0.00886671 187.516 0.00627994 187.733 0.0196676 142.269 0.00610155 164.293 0.028155 185.904 0.0414876 140.408 0.0171866 146.34 0.0102776 187.672 0.0010085 156.735 0.020363 145.304 0.0136945 140.179 2.75153e-005 196.96 0.0152567 161.948 0.00981246 114.753 0.00123007 138.246 0.00165703 162.385 0.0117695 154.317 0.0174574 135.584 0.0017063 123.518 0.00110003 135.983 0.0128841 119.976 0.0107048 122.828 0.00684346 148.688 0.000971803 113.741 0.00860417 153.045 0.000468521 95.5051 0.00920899 115.186 0.00337943 98.8121 0.000669289 131.485 0.00364578 115.312 0.00656985 99.4516 0.0209648 96.4902 0.00249186 102.693 0.00264889 131.536 0.0092262 1456.8 0.35563 588.044 0.0056552 615.341 0.0124354 769.302 0.0106035 720.249 0.0270038 556.477 0.0144336 530.625 0.00410034 411.652 0.0168705 480.043 0.00425923 358.959 0.0205185 378.322 0.0112012 392.099 0.00911943 412.546 0.000995696 346.86 0.0216434 360.735 0.00743577 216.417 0.00646567 324.506 0.00207939 269.356 0.048601 207.826 0.0010036 205.38 0.0556732 220.774 0.0112099 212.538 0.00110469 196.447 0.00673823 189.534 0.0377143 213.487 0.00062643 174.914 0.0311826 168.454 0.0452659 163.114 0.0246809 148.886 0.0251061 152.639 0.00513552 192.683 0.0203763 155.881 0.0195611 157.376 0.0124643 151.254 0.00484208 146.208 0.0219391 149.599 0.00580215 152.258 0.00342268 151.081 0.00276698 158.228 0.0116592 126.954 0.00153391 155.615 0.00838753 189.44 0.00979295 143.678 0.0201897 185.16 0.00718851 117.3 0.00122305 139.84 0.0128307 154.225 0.00127787 118.133 0.0114176 122.713 0.0381512 133.124 0.00215073 148.259 0.0103236 132.254 0.000385753 119.854 0.00711647 109.921 0.00735373 128.136 0.0340002 118.143 0.0101051 113.262 0.00717143 92.6208 0.00375505 100.598 0.00961037 110.48 0.00902488 99.7202 0.0030443 97.1804 0.00257776 138.928 0.0122036 153.371 0.00759355 1409.22 0.166041 932.222 0.0276589 647.19 0.0128695 614.456 0.0390943 870.044 0.00229648 417.592 0.00754825 493.329 0.0162469 404.431 0.0526703 388.522 0.0211531 411.948 0.0130497 477.939 0.0083582 440.167 0.02916 398.352 0.00432099 287.044 0.035515 390.599 0.00628168 277.149 0.00560186 260.153 0.0208504 219.179 0.0381849 223.731 0.0183476 190.436 0.0144831 219.77 0.0318391 170.29 0.017423 167.157 0.0010604 172.008 0.0068695 179.06 0.0112807 171.886 0.00372518 181.638 0.00135371 142.506 0.0277131 143.966 0.000887386 178.053 0.000604677 187.284 0.0087515 155.062 0.0240388 158.643 0.0117126 152.11 0.00331316 179.748 0.00498652 139.934 0.00503411 126.368 0.00401512 129.29 9.52435e-005 142.921 0.00314338 158.432 0.00586256 135.755 0.0024775 121.854 0.000129611 156.785 0.00533078 145.817 0.00788211 128.385 0.0136892 127.719 0.0154313 116.267 0.0171097 115.98 0.0125369 127.613 0.00107185 144.3 0.00117036 124.636 0.00013442 126.038 0.00691763 105.559 0.00261403 111.408 0.0139744 128.887 0.00174918 126.967 0.00685859 109.286 0.00456009 108.499 0.000654155 93.1289 0.00391162 115.275 0.00930799 115.753 0.0137831 122.838 0.00215065 134.6 0.00113174 149.522 0.000401904 1111.51 0.0167433 616.818 0.00129809 563.356 0.017076 619.432 0.0382042 513.961 0.00047804 541.143 0.0165394 535.077 0.0327052 394.313 0.0489732 477.388 0.0130986 464.692 0.00189765 392.099 0.0277276 438.36 0.00140613 363.798 0.00591646 278.196 0.00957798 331.188 0.00412586 388.45 0.00151179 253.883 0.00340729 258.869 0.0319993 263.028 0.012744 254.965 0.0303052 283.76 0.00705053 211.748 0.0157754 218.385 0.0294896 179.607 0.0355995 192.886 0.0164647 189.654 0.0040625 163.335 0.0167645 183.705 0.00685263 220.577 0.00735488 160.347 0.00288924 146.127 0.00540926 134.945 0.00525768 154.653 0.00942323 194.976 0.0100387 149.761 0.00621798 159.407 0.00314187 151.132 0.00178805 134.064 0.0148241 143.945 0.00370807 155.572 0.0142166 153.149 0.00596001 158.798 0.0115003 142.079 0.0154332 169.734 0.00247797 113.107 0.00304666 126.439 0.0169371 119.047 0.0055158 105.723 0.00863886 151.191 0.00606947 123.132 0.00239298 129.733 0.0226104 109.012 0.000576837 130.609 0.00841834 106.534 0.00163164 131.086 0.0102301 107.676 0.00684104 108.311 0.0170368 104.531 0.00219931 111.109 0.00630626 127.188 0.00397168 119.253 0.0159141 128.872 0.00586774 115.546 0.00148061 173.86 0.00396198 1008.55 0.0228803 566.09 0.00685793 489.748 0.0593571 587.982 0.0499316 713.801 0.0266339 463.823 0.00694483 478.968 0.017805 440.45 0.0214574 425.672 0.0378581 393.488 3.93156e-005 381.027 0.0330278 350.06 0.00263645 456.802 0.00902147 291.437 0.00515393 304.901 0.0433796 283.295 0.0187626 261.975 0.00124352 237.208 0.00584576 280.29 0.00552992 211.96 0.00478211 201.928 0.0552732 207.21 0.00180589 250.372 0.0148694 187.946 0.0102306 208.846 0.00535934 201.399 0.0619733 146.7 0.00168686 185.642 0.0208407 184.889 0.00935121 146.629 0.0061832 199.762 0.00136871 135.737 0.00512267 174.473 0.00600411 127.506 0.000596656 138.887 0.0100902 150.959 0.00342919 207.423 0.000148148 146.959 0.0155037 166.485 0.0155682 148.656 0.0177903 132.081 0.000770203 157.767 0.00845496 134.235 3.96312e-005 117.365 0.0181811 122.254 0.00809325 110.405 0.00312016 129.319 0.0148854 94.3056 0.00189511 106.308 0.00656066 134.341 0.0137053 106.495 0.000804444 102.054 0.00749285 121.255 0.00967762 96.639 0.0126037 106.557 0.00483241 108.597 0.0131693 115.82 0.00445865 117.207 0.00924788 127.039 0.000674664 106.063 0.00278426 125.931 0.00449188 96.053 0.00568378 109.513 0.0023881 123.596 0.0176456 1238.49 0.00907884 443.721 0.0176792 652.332 0.017968 609.63 0.0147151 544.094 0.014587 653.641 0.0144798 469.722 0.0322128 524.541 0.0161012 467.596 0.000949793 511.94 0.0145676 356.909 0.040166 494.8 0.101005 329.077 0.0106811 317.218 0.00673915 391.687 0.0439205 305.05 0.028742 240.537 0.0086313 256.901 0.0201528 279.343 0.00715716 180.662 0.00133842 207.243 0.0142213 231.452 0.0146105 244.248 0.0273988 204.675 0.0027048 211.446 0.00469111 166.005 0.00237549 161.863 0.000736126 155.617 0.00811905 152.47 0.00443941 148.625 0.0115551 161.273 0.00713452 162.138 0.000174987 146.33 0.00611745 129.198 0.00960017 173.838 0.00336605 126.771 0.00257472 155.978 0.00779412 119.508 0.00352808 127.597 0.00739295 139.073 0.0199697 129.48 0.00682632 105.322 0.00600193 144.77 0.00118402 128.234 8.97772e-005 134.934 0.00350968 123.883 0.00331332 119.299 0.0179835 116.294 0.00213259 113.995 0.00760361 157.598 0.000154505 99.3105 0.00476536 119.632 0.0069528 106.196 0.00247571 117.579 0.00623694 98.0791 0.00503906 102.469 0.00706931 104.658 0.0012483 138.96 0.0121671 98.7993 0.00135792 119.427 0.00638463 119.511 0.000857567 97.8474 0.0115668 141.214 0.00147539 141.591 0.00867109 875 0 599.086 0.0538732 578.928 0.0533717 523.435 0.016004 689.289 0.00494032 570.453 0.00292161 583.236 0.0101146 459.944 0.000141076 526.796 0.0192391 424.843 0.0177141 337.575 0.0163068 358.718 0.01053 387.566 0.000118282 327.105 0.0206806 330.905 0.00621567 304.287 0.00363444 263.351 0.0194657 203.932 0.00464471 215.902 0.00207118 213.804 0.00399606 201.412 0.0386688 193.083 0.0107687 190.299 0.000237611 198.69 0.0227808 188.317 0.00520443 161.646 0.00265116 192.184 0.00887835 161.291 0.0038514 173.359 0.0128103 141.193 0.00302017 162.555 0.00057218 142.325 0.000375954 171.289 0.0105225 158.269 0.000628239 136.293 0.00635332 140.007 0.00994886 136.3 0.00385531 127.28 0.00810692 146.836 0.00199289 125.69 0.0147223 123.738 0.0103506 130.056 0.0172377 161.209 0.00235625 106.786 0.00340525 133.129 0.00489359 120.164 0.00420028 130.973 0.00954256 122.365 0.00892346 108.607 0.000165051 122.051 0.00796021 99.9403 0.0013606 100.43 0.00428584 159.617 0.00219385 103.697 0.0115418 121.089 0.0156305 108.389 0.000308342 101.112 0.00235036 121.013 0.0116154 101.596 0.00489378 121.764 0.00803822 106.144 0.00401705 115.504 0.00239409 104.46 0.00668959 203 0 759 0 340.562 0.000968435 882.071 0.000178137 852.935 0.0260854 377.021 0.003885 444.905 0.0250121 581.494 0.0347632 367.24 0.0020503 436.132 0.00592369 468.371 0.00582264 386.537 0.0156742 460.655 0.0219863 458.354 0.00504487 280.791 0.0255752 302.886 0.0208854 302.421 0.0294373 278.551 0.0416306 229.417 0.00448139 254.446 0.00145663 197.626 0.0462073 218.634 0.00457706 183.731 0.00273921 201.988 0.000879789 223.14 0.00431188 228.195 0.0119339 188.858 0.025438 214.329 0.015643 169.451 0.0126141 154.313 0.00782301 155.053 0.0042446 148.875 0.000541952 140 0 243 0 147.08 0.015246 172.799 0.00605903 163.029 0.00576552 144.31 0.00134171 144.825 0.0287245 119.96 0.0203692 134.602 0.00361466 121.062 0.000616213 154.283 0.0174683 119.836 0.000731562 136.593 0.0109353 123.093 0.0250822 120.876 0.00466986 132.181 0.00557879 116.317 0.00862197 119.317 0.0208153 105.564 0.00064713 107.607 0.00172063 112.032 0.00133928 142.466 0.00225366 103.917 0.00275044 104.155 0.0103274 114.463 0.0387851 125.62 0.00521979 129.906 0.00150192 121.098 0.00641905 142.15 0.004694 107.773 0.000736196 131.414 0.00489236 76.3441 0.00236743 153 0 976.148 0.0981966 663.019 0.0105783 577.291 0.0185994 515.413 0.00533568 483.057 0.013017 613.729 0.0467658 443.348 0.0163955 423.954 0.029746 377.004 0.00931034 368.905 0.000549566 482.485 0.00591085 372.563 0.00657997 488.41 0.0623834 399.497 0.000537586 265.802 0.000555982 298.269 0.000237643 329.293 0.000432599 208.854 0.0120889 268.817 0.00949958 226.007 0.0571951 255.088 0.0042215 204.191 0.0188008 225.76 0.00896469 195.776 0.00140031 236.759 0.0214661 189.797 0.0197691 170.957 0.000356235 168.855 0.0401985 202.496 0.0188758 167.505 0.00778758 183.757 0.00815582 148.247 0.0104161 147.528 0.00862514 134.114 0.0186815 147.085 0.0194045 150.632 0.00845976 146.852 0.00523626 142.692 0.00479422 129.124 0.000201585 130.635 0.00926432 138.708 0.00985063 133.802 0.0639846 137.859 0.0133485 116.463 0.0086961 134.498 0.00297873 119.207 0.0129432 137.578 0.0392338 114.658 0.000637289 120.769 0.00551053 121.979 0.00432098 114.375 0.00289002 121.015 0.0105711 106.282 0.00623895 105.894 0.00623222 127.531 0.00113629 106.169 0.00216151 112.355 0.00331675 93.137 0.00441358 104.413 0.00123657 106.868 0.00551575 123.312 0.00830867 112.375 0.00733834 119.689 0.00188503 152.291 0.0162784 1173.31 0.0168817 711.242 0.00257427 565.385 0.0463364 595.397 0.0163591 528.998 0.000900619 509.209 0.00300694 486.985 0.0398858 525.763 0.0285888 407.908 0.0332167 558.968 0.000700352 385.257 0.0455257 490.403 0.0128102 314.734 0.0252359 301.889 0.00190826 319.401 0.0260629 259.797 0.00293131 325.716 0.000128376 261.237 0.0313169 251.935 0.00964214 208.586 0.000977824 204.657 0.0129736 210.514 0.0117754 182.737 0.0129768 189.427 0.00685209 214.739 0.00100438 209.832 0.00284764 183.688 0.0151992 212.186 0.00848975 174.016 0.0103212 191.615 0.00775973 208.827 0.00377012 162.267 0.0168826 166.864 0.0191259 155.235 0.00219717 147.669 0.00762607 166.638 0.00785959 142.339 0.0060814 145.563 0.00537167 138.486 0.00670306 104.636 0.00132791 122.987 0.0059131 108.076 0.00254391 117.104 0.0104347 109.362 0.00806673 127.344 0.00674539 135.876 0.000975695 152.933 0.00160417 114.036 0.0182854 119.38 0.00137842 107.831 0.00271245 124.474 0.0053405 101.074 0.027771 127.666 0.00215082 109.909 0.000527546 122.215 0.0133729 120.912 0.00150827 120.219 0.000328686 118.329 0.00180314 105.215 0.00601071 107.196 0.0162607 116.63 0.0107509 104.624 0.00706635 124.313 0.00647324 194.474 0.0117816 1089.74 0.0603949 609.267 0.0145547 402.071 0.0191393 503.433 0.0159139 626.833 0.0301419 454.747 0.00496946 521.412 0.0113498 562.881 0.00262871 456.307 0.0275888 405.462 0.00945944 400.827 0.0492188 368.714 0.0044 531.119 0.0112807 343.203 0.00993895 356.424 0.0120394 312.056 0.0076324 303.819 0.00255604 255.405 0.0327836 233.088 0.00269513 280.443 0.00220713 246.583 0.0136167 225.923 0.00633022 276.328 0.00335113 199.943 0.00311742 189.787 0.00278982 214.838 0.0106879 184.413 0.00850102 160.684 0.0111814 243.126 0.00185325 198.205 0.0333913 148.129 0.00411992 179.03 0.0212196 144.277 0.00320244 170.292 0.00459061 162.774 0.0081666 137.62 0.00401004 152.245 0.0139794 151.324 0.003942 131.989 0.00667243 157.041 0.00961776 134.205 0.0119386 112.936 0.00253336 105.195 0.00269928 122.32 0.000123454 122.565 0.00387294 120.622 0.0178327 112.956 0.0138534 121.181 0.00334422 91.2479 0.00138319 104.309 0.00247018 99.3314 0.011601 111.966 0.00298002 124.628 0.00467668 125.085 0.00445313 140.927 0.000990506 108.626 0.00935203 124.118 0.00403399 135.456 0.0047251 117.952 0.000259875 110.759 0.00475226 108.836 0.00602148 121.04 0.00346649 116.487 0.000660232 170.618 0.000605811 1326.69 0.0101613 637.372 0.0165984 772.524 0.0110857 579.204 0.0175381 521.895 0.000774941 416.224 0.0138284 426.69 0.055744 378.05 0.00741979 426.42 0.020327 374.758 0.0402489 386.305 0.00468173 334.939 0.00596153 335.862 0.00375418 338.373 0.0198149 368.211 0.00731261 395.439 0.0060118 246.986 0.0115602 230.203 0.00459008 338.09 0.00283554 189.117 0.00211993 220.578 0.0116886 212.31 0.0015796 188.806 0.00429613 201.395 0.0227903 215.102 0.0020226 162.787 0.00645935 236.201 0.00264974 163.382 0.00520556 190.01 0.00383363 173.25 0.00320257 167.421 0.00725358 161.135 0.00637452 148.39 0.0184041 173.143 0.00431139 158.283 0.00950994 145.302 0.00802508 138.625 0.00421125 133.387 0.00431531 139.785 0.0142654 120.322 0.00504165 129.932 0.0014949 129.93 0.00660195 133.424 0.0157176 115.713 0.0276976 95.6526 0.00367221 122.333 0.0357786 111.501 0.000863249 104.182 0.0035811 126.65 0.00592369 107.91 0.000917214 131.337 0.00267057 124.826 0.0194377 126.036 0.00434837 117.824 0.00157004 115.136 0.00257237 93.3136 0.0261081 124.228 0.00232593 110.196 0.000413858 105.008 0.0103239 124.005 0.00608178 112.018 0.00126862 132.184 0.00247456 97.3983 0.00778191 122.081 0.00105131 1212.11 0.00661043 638.543 0.00506047 592.553 0.0028985 545.312 0.00570369 838.25 0.00111056 467.107 0.0129616 490.037 0.00354699 466.787 0.0230223 429.983 0.0010544 494.361 0.00286815 386.178 0.0348192 362.625 0.0162214 454.988 0.0360411 326.424 0.00568112 306.508 0.00380242 334.601 0.0318525 292.726 0.00686213 239.313 0.0183726 214.9 0.0148556 208.862 0.0401285 242.369 0.00565665 217.549 0.0598143 221.432 0.0110944 279.024 0.00172932 216.339 0.00670881 175.766 0.0255753 226.419 0.0736443 225.006 0.000838004 169.649 0.00636476 188.159 0.0103662 154.582 0.00225299 178.399 0.0384591 170.615 0.0154915 141.554 0.0234129 168.692 0.023512 169.774 0.00990499 145.737 0.000960126 142.991 0.00219329 146.689 0.0138364 140.027 0.000282685 135.019 0.00216162 152.304 0.000221003 162.176 0.000852544 188.513 1.29902e-005 129.865 0.00031426 110.301 0.00237049 128.159 0.00216649 122.547 0.0108977 116.631 0.00458464 119.39 0.000431352 131.434 0.0152396 108.914 0.00404827 117.974 0.00672069 108.725 0.0172253 134.182 0.00208031 111.765 0.00290083 103.721 0.00733698 114.327 0.00759256 133.874 0.00954667 108.465 0.00459668 120.655 0.000389445 130.242 0.020099 111.006 0.0020818 135.557 0.00213493 1066.24 0.0524833 928.721 0.0243587 642.592 0.00629818 528.448 0.00785796 875.833 0.0193482 458.73 0.0129853 493.573 0.0579886 477.639 0.0373962 449.54 0.019259 404.047 0.0207152 486.449 0.00393879 390.16 0.00145505 361.198 0.00651043 259.78 0.0156283 382.298 0.00632179 313.565 0.00772409 310.837 0.0126302 244.425 0.0105445 322.888 0.00155293 242.128 0.000585684 228.831 0.0335479 231.164 0.0001803 256.831 0.000806243 172.612 0.0149631 209.97 0.00802384 183.782 0.0410918 179.432 0.0188513 198.431 0.0046875 195.529 0.0192038 167.671 0.0121677 198.457 0.00599272 167.89 0.00225768 169.106 0.0035791 152.442 0.00170987 158.935 0.0056018 159.378 0.0149189 154.484 0.0156825 145.84 0.00862716 139.182 0.00300337 147.12 0.00664225 125.224 0.000685921 120.651 0.0130612 128.56 0.00757727 137.93 0.000148427 119.614 0.00719603 120.345 0.0145092 132.958 0.00357004 136.503 0.019101 124.223 0.00708428 147.164 0.0143728 145.466 0.00108176 119.679 0.0121361 131.089 0.0336323 137.894 0.0186189 165.412 0.0184481 123.101 0.010692 120.188 0.0143802 108.15 0.00084846 114.673 0.00647576 137.278 0.00622927 113.461 0.0166795 114.646 0.00254918 114.121 0.00433974 122.662 0.0147487 922.901 0.0132717 570.911 0.00303682 555.717 0.00520172 763.06 0.0555761 625.161 0.093177 556.933 0.00371674 597.244 0.0375603 405.535 0.00503039 432.328 0.0201067 475.583 0.0336799 386.426 0.00873269 392.532 0.00483661 360.883 0.0362014 445.436 0.0107499 298.071 0.0120674 358.212 0.0136216 253.332 0.0140989 305.421 0.017503 345.071 0.00982445 230.817 0.00563213 242.892 6.97386e-007 273.158 0.0288895 290.773 0.000140937 285.927 0.0172472 233.057 0.0129204 236.312 0.00384307 204.867 0.0119383 194.687 0.00793425 242.305 0.0121006 190.024 0.000859775 191.17 0.0284801 183.005 0.00138195 177.403 0.00420893 187.642 0.00880828 147.507 0.0100524 150.736 0.0250813 143.481 0.0024494 161.452 0.00216581 136.957 0.00237527 120.193 0.00845611 149.832 0.00251386 136.014 0.0117019 137.559 0.00630103 115.411 0.00397417 144.465 0.0181091 114.582 0.00534313 141.85 0.00709783 137.403 0.0104502 122.252 0.00497537 134.613 0.0218776 134.803 1.93082e-005 139.469 0.0323633 125.636 0.00258688 120.377 0.00151119 138.838 0.00223433 123.881 0.00163216 132.713 0.0116501 115.869 0.00303427 123.377 0.0085867 127.814 0.0132978 120.602 3.58391e-006 131.034 0.00384994 124.768 0.000116333 151.765 0.000983263 656.719 0.0491902 578.484 0.0323763 735.737 0.00848941 719.871 0.0524859 511.099 0.0579063 609.434 0.0102038 775.434 0.00412823 692.173 0.0224701 416.307 0.00639298 389.059 0.0176986 422.624 0.00368345 382.007 0.000397929 362.446 0.0315139 350.249 0.0116087 397.534 0.0468838 320.815 0.0208153 335.572 7.10543e-015 227.857 0.0200912 261.334 0.0101156 220.715 0.0349937 234.706 0.0281084 219.861 0.0586923 289.324 0.00141336 287.601 0.00177012 199.06 0.00218057 284.877 0.00292644 178.129 9.7545e-005 204.274 0.000508614 207.131 0.000759365 199.265 0.00878881 215.834 0.0179541 167.584 0 207.936 0.0208153 162.619 0.0275271 183.779 0.000797445 167.333 0.0321693 161.689 0.00585502 181.628 0.00243578 131.123 0.00500257 135.486 0.00650244 206.641 0.00625995 180.379 0.00389726 145.315 0.00918232 160.237 0.000416888 153.044 0.0319833 135.997 0.0227123 170.352 0.0163112 118.806 3.55271e-015 156.676 3.55271e-015 135.725 0.00941986 109.307 0.000389811 115.039 0.0109405 127.461 0.00497614 124.421 0.00184776 123.711 0.00685168 131.175 0.00710296 125.296 0.00118161 132.579 0.000974044 126.102 0.0123557 118.794 0.00224941 135.958 0.00163213 121.338 0.0009847 103.497 0.00357133 123.136 0.00361466 735.168 0.016412 803.371 0.0217359 675.722 0.0229033 704.993 0.0093776 868.88 0.102541 558.329 0.0523825 502.105 0.0155605 464.657 0.0597763 472.636 0.0411025 468.41 0.0140658 498.871 0.0294783 346.145 0.0187048 408.129 0.023565 403.608 0.00463149 400.413 0.00668392 325.314 0.0021803 273.875 0.00810348 262.083 0.00454918 264.128 0.0549676 268.598 0.0238376 228.191 0.00407752 262.619 0.00640593 239.536 0.00826852 235.481 0.00502444 188.971 0.00558101 212.929 0.0145678 193.072 0.00547465 165.961 0.00185238 218.794 0.0047289 217.771 0.00665162 193.701 0.00560365 186.194 0.0108921 194.538 0.00165183 199.414 0.00261899 175.81 0.017702 148.035 0.00551133 160.697 0.00603521 144.619 0.0113248 157.011 0.00367955 139.449 0.00290088 142.863 0.00822513 171.086 0.0172806 180.003 0.00491629 152.722 0.0120543 140.51 0.00442837 144.591 0.00077476 157.673 3.7434e-005 123.136 0.00449596 155.435 0.0285613 132.822 0.0118038 174.291 0.00724025 136.582 0.00551987 148.242 0.0195628 124.686 0.00160438 122.585 0.00016455 112.431 0.0107176 116.283 0.00811008 103.969 0.00498327 116.263 0.000240166 122.203 0.00162268 131.259 0.000811325 120.294 0.0162943 126.407 0.00260216 134.615 0.00664028 629.387 0.0674516 943.335 0.00606174 930.724 0.0111521 631.738 0.0136677 726.63 0.168959 528.002 0.0154341 535.179 0.0156788 489.3 0.0162939 454.973 0.022314 459.558 0.00244004 435.506 0.00225963 478.465 0.00972495 409.852 0.00963737 378.789 0.130422 443.064 0.0096681 305.607 0.0145541 261.434 0.00536134 258.842 0.013301 308.49 0.00324355 287.768 0.00800692 255.871 0.00465426 292.559 0.0143506 222.493 0.00601462 235.496 0.0181365 258.768 0.0287549 210.472 0.0113303 304.63 0.000750188 248.528 0.00579771 231.099 0.00905754 198.068 0.012693 206.623 0.0105327 187.977 0.0622481 201.084 0.0192646 187.434 0.00380666 163.718 0.00822396 180.34 0.0152228 187.491 0.0182976 180.899 0.00575862 189.551 0.00829056 149.006 0.0445844 160.001 0.0194099 136.245 0.00502196 182.086 0.0154623 156.719 0.0100332 147.607 1.00254e-005 147.223 0.00991049 138.138 0.00779698 156.509 0.00674351 156.07 0.0119169 141.152 0.000238196 168.649 0.0205768 124.59 0.0143079 140.029 0.00273578 147.758 0.0146551 155.324 0.00454583 116.232 0.0142494 125.53 0.00143201 122.441 0.0115078 131.547 0.00749952 114.411 0.00650873 117.017 0.00685503 127.184 0.00483775 108.427 0.0156095 131.44 0.0132859 806.342 0.0593448 853.014 0.057213 612.871 0.00432342 672.272 0.031159 603.189 0.0336007 648.036 0.0431911 514.297 0.0330982 508.137 0.0502348 472.72 0.0625474 415.774 0.0493429 490.956 0.0239349 546.36 0.0410123 459.453 0.00432562 321.361 0.02295 390.055 0.00289824 356.603 0.0795328 383.637 0.0321483 339.046 0.000229717 291.27 0.00555932 383.299 0.0300611 285.844 0.0417654 252.305 0.00564159 298.825 0.00992275 238.549 0.004571 318.651 0.00811808 266.309 0.00884501 246.883 0.00718962 299.602 0.00935811 306.735 0.00538913 209.974 0.0200007 204.808 0.0173393 193.309 0.0188994 202.556 0.0539397 210.758 0.0103217 190.296 0.000799438 193.804 0.0114176 166.859 0.00601499 214.055 0.00229846 176.385 0.00846181 157.364 0.0175851 192.94 0.0332792 182.275 0.00785169 176.886 0.00188521 157.466 0.00419523 156.122 0.00190724 159.451 0.00424834 142.557 0.00582189 134.076 0.0192767 147.244 0.0274208 165.963 0.00205444 160.418 0.0170289 132.363 0.00192443 140.351 0.00136711 132.823 0.00301524 124.814 0.00380692 176.738 0.00399641 144.727 0.0224675 122.371 0.00205844 131.296 0.00288973 120.211 0.00199211 133.357 0.00495252 131.34 0.000627569 176.574 0.00113154 103.084 0.00842349 807.169 0.0211939 489.389 0.0293143 937.405 0.0185618 495.983 0.08049 561.134 0.00804027 480.45 0.0091956 618.254 0.0190648 481.676 0.0432736 558.869 0.00704095 399.353 0.00239799 476.269 0.00621079 421.813 0.0469319 450.781 0.00460798 342.3 0.0411393 391.818 0.0149326 327.983 0.00340296 376.029 0.0360968 391.592 0.0270098 357.121 0.00774852 296.4 0.0192953 369.405 0.0178755 257.576 0.0568202 364.326 0.00583356 251.083 0.00519802 390.314 0.0104357 390.348 0.00346889 225.472 0.00384976 332.805 0.0338088 233.726 0.00422692 213.646 0.00449288 247.751 0.0074967 253.275 0.00570243 182.318 0.00204086 219.456 0.0135081 173.946 0.000390914 180.648 0.0188577 165.878 0.0313991 187.133 0.00402316 175.948 0.0117721 207.168 0.0125245 211.626 0.00808084 213.061 0.000506996 214.578 0.00396799 163.788 0.000919518 212.781 0.00307602 169.551 0.0033677 170.773 0.00269807 166.93 0.0143887 157.281 0.00254762 154.969 0.00692432 130.774 0.0325645 125.997 0.0139396 159.358 0.000802562 135.548 0.0116732 163.163 0.00466186 140.256 0.0167985 145.636 0.0164537 125.496 0.00163074 118.71 0.000855854 122.817 0.00864739 137.888 0.000928627 134.42 0.0106451 140.651 0.0106894 124.45 0.00605673 784.189 0.021423 747.003 0.045389 662.46 0.0034779 570.392 0.00691781 678.013 0.019274 501.04 0.0241573 480.773 0.0140726 603.054 0.0154979 491.494 0.0358753 508.535 0.00217512 473.034 0.0349217 392.57 0.038735 453.876 0.0340198 457.977 0.022043 474.909 0.00403553 365.895 0.00807861 347.126 0.0216427 356.017 0.0193726 297.365 0.0163081 347.543 0.014119 375.817 0.00204431 424.713 0.0498696 323.103 0.010421 220.67 0.00735029 287.897 0.00981292 237.286 0.00637611 234.066 0.00201961 229.326 0.00751741 255.231 0.0100729 228.682 0.00600635 239.438 0.0299401 201.848 0.00213102 207.065 0.00652156 236.133 0.00240585 238.391 0.00874369 234.621 0.0131499 255.608 0.00218431 204.658 0.0231428 196.834 0.00361215 218.559 0.00117636 182.554 0.00516486 190.672 0.00876955 171.28 0.0294708 204.976 0.016242 218.315 0.0103179 181.113 0.00454428 179.371 0.00615342 185.997 0.00767791 195.566 0.006881 157.285 0.0137433 166.603 0.00502438 182.14 0.00840036 143.138 0.00686293 159.511 0.0314978 175.306 0.014991 131.405 0.0045912 152.661 0.0044894 139.267 0.00011637 147.683 0.0110863 131.541 0.00799131 136.516 0.00587065 143.833 0.0128779 120.849 0.0185017 115.688 0.0126401 1024 0.00758619 884.77 0.0963309 786.872 0.00282619 711.369 0.0113794 904.226 0.00280081 478.083 0.00303036 524.198 0.0250352 527.293 0.00125966 669.847 0.00312748 610.091 0.0185395 564.478 0.00524395 412.609 0.0143534 557.649 0.0135107 476.195 0.0374265 464.676 0.0402846 378.946 0.00547556 347.731 0.0161573 415.342 0.154972 299.922 0.0115394 358.977 0.00197542 334.384 0.0167125 379.457 0.0039726 358.525 0.00857461 295.575 0.0171225 348.344 0.0124139 237.594 0.00912114 278.422 0.0375079 255.316 0.0165004 236.794 0.0283656 244.051 0.0321267 272.155 0.00916482 235.214 0.00996319 271.859 0.00210084 255.041 0.00946277 248.754 0.00131797 251.857 0.000206006 250.502 0.0315467 207.183 0.00471455 215.617 0.0158988 197.644 0.00403054 214.963 0.0154851 198.571 0.00948358 247.83 0.00521074 180.985 0.0128948 191.961 0.00672611 174.747 0.0433238 208.736 0.0162455 185.622 0.00442639 199.961 0.00154448 155.042 0.00416844 156.453 0.0130352 171.61 0.0331165 128.185 0.0278972 146.826 0.000649337 138.218 0.00131833 144.508 0.00344509 140.621 0.00657821 140.198 0.0249743 128.029 0.00846651 139.148 0.00646352 126.148 0.00274437 129.102 0.00478215 136.07 0.00789277 122.352 0.0105713 791.978 0.0466812 889.258 0.0036446 906.949 0.151615 749.818 0.0599699 841.457 0.0337433 637.731 0.0302945 947.861 0.039503 532.514 0.0397703 581.863 0.0520581 436.374 0.0368026 544.022 0.0458694 495.519 0.0537496 487.341 0.031408 529.779 0.00583854 396.381 0.0570397 373.055 0.0208676 303.406 0.0453537 362.638 0.014822 426.341 0.0553491 340.802 0.00630762 452.306 0.0216001 322.01 0.0133413 307.339 0.00856687 293.671 0.00382421 314.988 0.00469717 361.623 0.0334 268.011 0.0405365 258.641 0.0113544 260.558 0.00177451 245.079 0.0293341 359.145 0.00811494 275.458 0.00626925 264.764 0.0133587 219.721 0.0131377 236.84 0.011343 261.127 0.00949395 267.698 0.0147921 253.456 0.0139539 243.072 0.0144588 236.514 0.00448604 245.87 0.0150107 254.617 0.00160432 239.099 0.000807586 200.79 0.000670071 215.737 0.00477118 215.892 0.0160166 157.454 0.00783341 156.227 0.0212591 157.294 0.000444783 201.4 0.00137196 161.13 0.00164 160.711 0.0212837 198.399 0.00543829 146.55 0.00120164 167.855 0.00074625 149.05 0.00250745 160.806 0.0179669 143.55 0.00402182 181.104 0.0101086 156.174 0.00188206 151 0.00249984 154.131 0.00433395 166.399 0.0120605 132.518 0 766.922 0.0142853 911.97 0.0379152 691.52 0.0385442 699.538 0.028081 645.219 0.00820008 746.805 0.0283335 636.229 0.0090081 502.48 0.0039974 582.393 0.035123 566.308 0.00592572 534.886 0.083072 432.916 0.0808881 407.051 0.0838975 622.476 0.0275248 437.392 0.00686057 419.032 0.0208153 404.981 8.88178e-016 426.489 0.0076092 438.602 0.0248427 382.598 0.056313 344.4 0.0241061 424.529 0.00456516 333.567 0.013107 295.443 0.0521372 364.487 0.00612871 281.072 0.00814817 296.862 0.0158836 314.433 0.0118431 317.16 0.00605793 266.425 0.00115167 263.662 0.00788073 342 0 336 0 284.609 0.0164378 295.505 0.102583 256.06 0.00881078 283.678 0.00336754 243.583 0.00169491 253.076 0.00364583 255.296 0.0136054 229.576 0.00455769 196.555 1.45957e-005 232.442 0.00494955 261.157 0.00562484 232.607 0.0167414 189.312 0.00413096 179.15 0.0262382 212.326 0.00862197 175.406 0.00505063 165.117 0.0042608 165.039 0.00314693 170.054 0.0299385 184.893 0.00697644 187.619 0.0154208 182.998 0.00120345 170.994 0.000506752 173.611 0.0149742 180.042 1.4829e-005 188.943 0.00660354 140.065 0.000645028 132.821 0.00450689 137.341 0.0143283 132.377 0.00207087 107.669 0 634.789 0.0420082 618.359 0.0574172 684.751 0.0311527 985.008 0.0506441 695.617 0.00764941 639.088 0.0086344 710.701 0.0214625 471.706 0.0466907 528.638 0.0979733 491.053 0.0106882 515.887 0.00677199 459.04 0.0936506 530.116 0.0153905 559.516 0.0062212 417.792 0.000102521 461.903 0.0958716 495.754 0.00944041 408.346 0.00177086 474.91 0.0200292 383.486 0.00762852 384.103 0.0289767 367.041 0.00414534 327.686 0.0289584 379.14 0.0139276 333.747 0.00716368 312.754 0.015457 307.598 0.00900055 366.76 0.0168566 301.903 0.000171384 314.158 0.0157215 315.976 0.010696 334.388 0.000722522 339.61 0.00966768 288.595 0.0016468 362.504 0.0184209 272.485 0.0066381 284.498 0.0129526 270.222 0.0260009 239.309 0.00596908 252.744 0.00307206 250.722 0.0095339 290.401 0.00207016 215.784 0.00433743 188.839 0.0163583 196.952 0.0189767 229.328 0.0104506 200.335 0.00217561 178.846 0.00431563 250.905 0.00242797 206.723 0.000637351 144.945 0.00676583 192.151 0.0126437 175.651 0.0213515 155.542 0.0076719 161.469 0.00533394 192.955 0.00510282 169.619 0.00456819 157.262 0.013675 158.445 0.00176025 166.457 0.000734306 171.35 0.00536621 159.182 0.0147934 155.139 0.0176193 119.398 0.000803083 749.606 0.0192557 880.146 0.156288 1006.33 0.0210693 1046.59 0.02138 883.712 0.0180139 590.866 0.138985 545.143 0.00969328 565.22 0.0396036 508.718 0.10822 674.443 0.282783 444.3 0.0237333 462.708 0.0189194 442.076 0.0167774 523.926 0.0303062 563.111 0.0346331 414.088 0.0208714 498.162 0.061441 476.286 0.0088024 360.132 0.0235834 381.901 0.0214665 350.426 0.063547 399.926 0.00262566 344.846 0.0205255 402.348 0.0203156 421.704 0.0118821 446.847 0.0086755 336.789 0.0154965 314.153 0.0289892 346.232 0.0134524 356.76 0.00568355 339.389 0.0296997 335.614 0.000838035 387.433 0.0433776 323.622 0.0234787 367.942 0.034227 367.873 0.0148022 336.868 0.0311301 271.769 0.0174258 296.453 0.00198698 239.053 0.00657368 263.311 0.0134115 229.635 0.00359817 205.011 1.97428e-005 199.266 0.00604834 219.676 0.0621571 246.345 0.00969205 208.631 0.0145204 179.129 0.000928628 225.985 0.00787785 258.557 0.000386162 229.581 0.00158132 196.855 0.014693 158.558 0.00961701 198.038 0.0102288 197.02 0.00181283 151.648 0.00602445 191.836 0.000366663 141.871 0.00798872 149.768 0.00543501 159.514 0.0189063 182.934 0.000390875 132.325 0.0141908 199.004 0.0099233 112.751 0.00720483 701.407 0.0658818 931.771 0.0272036 1261.17 0.00970865 786.442 0.0893475 1011.37 0.112054 729.979 0.0112179 630.279 0.0224633 638.374 0.0776908 613.032 0.0317796 497.237 0.0623157 469.883 0.0634892 531.745 0.0621033 701.813 0.0367571 488.327 0.0868857 752.652 0.0406914 406.718 0.0220239 392.626 0.0152305 457.397 0.00800545 389.896 0.0494059 336.135 0.0193317 363.218 0.0313283 386.148 0.00788477 388.279 0.00709345 348.319 0.0400386 484.076 0.0132938 400.374 0.00923204 440.362 0.0102391 368.103 0.0475282 368.553 0.0733682 292.714 0.0330714 378.837 0.0359589 383.05 0.0322115 352.409 0.0155218 274.321 0.00299948 319.008 0.00965745 263.225 0.000444285 283.258 0.0672023 358.42 0.0359482 263.943 0.00514059 233.782 0.00535327 330.427 0.0243163 249.757 0.0102032 257.412 0.0157472 224.696 0.00861131 184.253 0.0068325 218.057 0.00723537 232.661 0.00897416 219.339 0.0427747 222.443 0.00855976 161.773 0.0035739 206.343 0.0029768 188.132 0.0052401 206.803 0.00733885 198.429 0.0254563 155.644 0.00905497 194.587 0.00195764 156.528 0.00701383 192.313 0.00257518 154.881 0.0132718 158.315 0.00695326 130.023 0.00351463 192.772 0.00105897 135.83 0.000941789 113.779 0.0113248 592.976 0.0187351 966.15 0.0538876 852.7 0.0495022 1039.6 0.000509596 848.415 0.000196181 647.897 0.0324949 569.308 0.0501262 589.589 0.056536 677.362 0.0908971 568.874 0.114773 685.786 0.00146605 527.976 0.0576195 668.091 0.0287313 710.281 0.00932253 695.094 0.0532956 832.701 0.0577633 489.674 0.0251897 458.667 0.0231202 585.857 0.043867 412.901 0.00783615 435.811 0.0270862 392.341 0.00586431 449.261 0.0937084 471.29 0.0145218 399.23 0.0079397 346.594 0.013541 403.031 0.00168522 377.364 0.00833156 375.736 0.0295829 408.993 0.00806063 409.18 0.00298113 302.483 0.0344163 333.857 0.0101497 340.804 0.0113282 324.615 0.0156975 293.689 0.00563823 296.07 0.00228635 247.821 0.00847004 274.742 0.00286179 302.92 0.00904614 265.095 0.00904104 259.217 0.00334056 248.316 0.00659612 212.219 0.0134477 245.268 0.0233598 231.414 0.00755249 207.554 0.00295104 191.53 0.00752023 171.718 0.00371647 206.047 0.00884728 185.995 0.00276707 220.657 0.00939902 167.333 0.00444911 198.002 0.0072794 188.249 0.00916341 201.715 0.0173939 169.648 0.000484786 167.532 0.00182768 158.553 0.00141708 170.997 0.00334951 156.035 0.00206724 148.898 0.0231959 200.147 0.00347184 144.586 0.00413786 711.959 0.000155679 967.266 0.0950959 819.435 0.0484261 932.867 0.00805917 967.251 0.0349879 770.523 0.0902725 792.635 0.0122818 563.412 0.0483509 620.115 0.0632731 707.552 0.0594505 517.278 0.0168444 488.275 0.0438536 659.862 0.0932406 769.596 0.027945 655.085 0.0478318 805.614 0.126652 827.323 0.0219762 477.856 0.00131154 543.184 0.00357907 399.408 0.0454423 566.187 0.0644547 458.484 0.00801665 440.668 0.0276616 522.012 0.00680598 447.372 0.0486676 499.791 0.00333599 385.439 0.0481573 321.344 0.0589382 400.264 0.00622656 377.303 0.0211812 354.98 0.000714722 403.024 0.00662117 334.364 0.0308412 281.045 0.0103128 325.7 0.00345393 309.947 0.0103394 324.992 0.0443416 296.844 0.00062154 322.959 0.0099659 326.252 0.00802479 343.469 0.00417829 211.805 0.00322988 272.115 0.000961663 213.653 0.0363225 229.482 0.0139083 197.525 0.00249835 229.503 0.0110894 234.394 0.00126319 259.616 0.0047587 198.512 0.000269473 230.339 0.0164547 189.518 0.00710111 187.056 0.00697185 184.13 0.00153391 176.151 0.00698242 180.51 0.00145959 157.621 0.00154249 203.948 0.0161827 169.988 0.00930151 183.671 0.0179439 181.764 0.0216166 193.937 0.00410026 173.874 8.59451e-005 132.545 0.000480563 866.144 0.0222552 1011.35 0.0418748 1387.06 0.0147543 905.466 0.0117248 783.586 0.0876522 768.347 0.0375636 674.882 0.0197716 764.94 0.016189 627.452 0.156323 619.712 0.0499244 665.573 0.0426628 645.262 0.0360856 618.985 0.0121644 670.641 0.0300144 575.432 0.0166408 645.728 0.03836 534.376 0.0412185 526.476 0.00286092 616.511 0.0437486 523.524 0.027273 516.96 0.0253331 478.846 0.00123826 480.341 0.00384421 441.67 0.0307771 440.765 0.0226537 437.09 0.0125724 375.927 0.0329648 449.657 0.000751206 387.194 0.00184001 331.587 0.00977613 406.303 0.00210215 347.231 0.00902288 359.243 0.0060241 358.316 0.0237203 319.867 0.0434237 307.956 0.00280289 295.752 0.00699317 278.058 0.0189062 303.448 0.00340057 349.375 0.0025594 361.375 0.0238709 308.299 0.00313028 304.273 0.00595338 271.826 0.00714765 299.284 0.010648 239.963 0.00721343 249.882 0.0039692 273.392 0.0162713 215.071 0.00209049 190.382 0.00834547 220.726 0.00643467 180.416 0.000288151 224.365 0.0128036 181.851 0.00735586 185.309 0.0146186 176.465 0.0240687 175.526 0.0088975 174.874 0.0109501 187.235 0.0279067 176.225 0.00661828 167.59 0.00265541 181.542 0.000564813 178.34 0.00158133 104.591 0.00803287 677.651 0.0108341 1026.38 0.0616357 1058.94 0.10722 1099.68 0.0933835 1009.15 0.112892 608.383 0.0382769 844.773 0.0410441 696.227 0.00514578 658.4 0.0125079 650.665 0.0326857 646.122 0.00287477 691.983 0.0155852 578.544 0.00800008 536.314 0.0395194 609.727 0.00899514 605.447 0.00427317 526.339 0.00575647 749.711 0.114264 439.759 0.00115988 487.153 0.0518846 485.408 0.071505 537.676 0.00692681 521.567 0.0726824 480.813 0.0756482 429.088 0.0176227 501.741 0.0487144 401.777 0.000654798 362.145 0.0201289 400.697 0.0935693 421.353 0.0229787 338.49 0.014596 313.945 0.00285952 378.749 0.00350925 341.853 0.0122593 337.752 0.00585516 301.084 0.043526 307.578 0.00322262 309.668 0.0203201 315.642 0.00445119 331.896 0.0157691 325 0.0151658 261.156 0.00733509 241.244 0.00126356 262.255 0.00623686 274.095 0.00409678 259.941 0.00231349 203.305 0.0042254 243.059 0.00808375 288.231 0.000465762 202.298 0.0144339 246.209 0.00367295 202.656 0.00653943 330.015 0.0204883 157.76 0.0080881 255.908 0.000127294 157.41 0.000726926 327.79 0.00118856 171.254 0.00903797 184.631 0.000685905 188.28 0.0101549 170.042 0.026485 222.827 0.00662963 182.186 0.00731475 147.359 0.00951934 802.217 0.012579 728.701 0.0454012 813.181 0.0233721 850.712 0.0794516 1072.39 0.010739 570.401 0.0727747 627.312 0.0164025 648.658 0.0519599 758.879 0.128718 785.689 0.0223506 556.738 0.0156018 673.832 0.0490388 667.51 0.0148532 502.844 0.0445941 568.955 0.0892124 495.123 1.06581e-014 484.425 1.42109e-014 508.055 0.00864812 573.498 0.170691 520.22 0.0201816 540.904 0.0165895 448.849 0.0456084 479.943 0.065222 421.25 0.0128964 498.584 0.0421522 382.347 0.0111838 367.108 0.0324684 367.87 0.000422904 355.584 0.0148226 395.784 0.00114732 355.875 0.0393753 338.614 0 406.706 0.0710678 388.437 0.0113552 486.909 0.0390635 365.382 0.00161688 357.395 0.0241137 405.294 0.00342097 368.651 0.00721046 265.842 0.0115251 317.401 0.011958 247.922 0.0124263 263.804 0.0107083 292.874 0.0447871 285.789 0.00267978 310.292 0.0300609 224.256 0.00308237 242.714 0.0380592 215.338 1.77636e-015 241.966 0.00226827 255.74 0.0488418 217.406 0.00350902 222.198 0.00501022 227.722 0.00579109 207.59 0.0088153 170.127 0.011377 213.738 0.00296356 165.369 0.00284733 207.651 0.0200218 166.387 0.015788 193.743 0.00166502 158.74 0.0112305 183.801 0.0167979 90.139 2.8448e-005 673.048 0.0522273 890.354 0.254005 958.209 0.0777392 1064.39 0.201277 977.369 0.0314228 509.449 0.00940948 946.571 0.00219884 683.287 0.0660316 621.602 0.0110357 839.395 0.0208915 655.522 0.0169133 657.656 0.0227204 606.302 0.0103209 558.477 0.0612821 583.749 0.00475387 499.603 0.00995885 529.285 0.00828184 558.232 0.0344737 493.093 0.0733961 453.896 0.00316292 506.071 0.0149105 380.391 0.0385447 445.424 0.0589094 375.738 0.0563039 411.902 0.0731767 461.008 0.0174597 351.514 0.00916461 406.927 0.00299632 558.658 0.00221491 359.598 0.0132129 555.941 0.021801 421.956 0.00447364 311.446 0.0262391 336.924 0.0487913 407.252 0.0141803 365.386 0.000791243 292.854 0.012854 300.757 0.00126308 335.679 0.00749453 297.054 0.00132637 313.285 0.00767536 360.102 0.000718353 314.281 0.0146009 288.376 0.0180156 248.363 0.00386633 297.262 0.0227034 255.997 0.0130808 292.505 0.000679802 237.743 0.062295 182.39 0.00260578 290.847 0.0288014 193.013 0.00022687 296.289 0.0331982 208.174 0.0313543 269.115 0.0102902 188.362 0.00713225 214.048 0.00832432 158.715 0.00600131 207.97 0.00694965 166.314 0.0477353 215.152 0.00219649 188.764 0.000772446 235.552 0.012332 105.759 0.0152506 722.083 0.00176718 764.759 0.0111859 841.63 0.0749285 794.631 0.0538722 1049.3 0.022854 587.79 0.124041 628.121 0.0514061 700.761 0.0211616 646.009 0.000948473 606.126 0.0596979 699.766 0.0381682 680.622 0.0283263 635.817 0.138117 701.47 0.00385393 631.98 0.0196221 626.902 0.00118142 686.068 0.0717862 622.958 0.00194286 467.137 0.0601935 477.451 0.00619248 511.562 0.0131106 454.815 0.0321981 566.909 0.0146406 456.501 0.00359524 398.766 0.00495432 365.99 0.019769 486.796 0.0438246 506.533 0.00510144 425.374 0.00991599 359.471 0.0557944 378.265 0.0125584 384.678 0.0123699 368.986 0.00225307 398.052 0.0411579 355.488 0.0704737 387.933 0.0420964 474.544 0.0235188 416.955 0.0621819 456.69 0.000149605 349.953 0.00636837 311.884 0.0162194 317.908 0.00479852 293.767 0.00280112 281.224 0.0103045 305.831 0.0278045 295.421 0.0025806 313.833 0.000291413 221.981 0.013722 293.588 0.00822501 233.028 0.00421056 272.416 0.0132114 205.682 0.0245086 259.12 0.00302927 218.921 0.00863334 300.038 0.0248418 290.389 0.0103762 249.999 0.00219402 246.06 0.0207732 220.374 0.00294332 201.999 0.00291761 223.187 0.00580777 172.582 0.00562451 177.985 0.042796 134.324 0.00391126 706.047 0.0173581 620.598 0.0318851 882.743 0.00789763 965.468 0.0493681 821.073 0.0592721 892.394 0.00197597 803.941 0.0738486 774.611 0.0173849 870.509 0.0728743 610.866 0.0256006 535.036 0.0420688 666.451 0.0250342 676.132 0.0131072 602.415 0.000219968 548.26 0.0592007 583.264 0.0038803 560.925 0.0601105 631.95 0.0455948 569.272 0.00259221 588.894 0.0165742 485.404 0.0305939 610.647 0.00729934 678.475 0.00283739 449.985 0.00129108 477.804 0.0198557 454.243 0.0212205 441.799 0.0193184 445.051 0.0297257 516.573 0.0143166 350.63 0.000148478 426.835 0.0722938 360.691 0.0336723 431.795 0.0114454 369.216 0.0230481 413.835 0.0114203 326.736 0.00333539 340.178 0.00225565 352.208 0.00173355 436.132 0.0192238 321.215 0.00146116 360.851 0.0119688 259.382 0.0162517 390.094 0.00401561 313.165 0.0138685 253.464 0.118319 226.153 0.0516683 236.427 0.0131878 276.953 0.0178644 241.055 0.00626173 246.376 0.00302776 182.617 0.0232214 267.135 0.00737369 196.836 0.0201332 216.28 0.00245163 194.607 0.00738367 268.691 0.015994 183.421 0.010951 249.665 0.00959207 191.349 0.00136859 177.613 0.0420661 194.876 0.0148504 148.585 0.000272468 287.501 0.000156306 114.092 0.00506961 574.92 0.0207753 751.987 0.0085304 711.491 0.137319 932.161 0.0640677 894.42 0.0709704 747.106 0.0147503 688.13 0.0614687 668.083 0.0454753 774.004 0.000730783 630.905 0.00596977 706.246 0.0548119 694.804 0.0101314 618.822 0.0311343 657.095 0.147069 601.766 0.00851599 686.003 0.00703096 569.537 0.00612637 572.786 0.0361139 507.738 0.0624175 465.625 0.0609121 586.095 0.01671 613.572 0.00822011 560.923 0.0311417 574.716 0.00982438 349.589 0.0150485 418.519 0.004309 436.994 0.0210839 516.541 0.053777 463.202 0.00857633 445.002 0.0170981 447.695 0.00294982 377.378 0.00487217 447.719 0.0472074 316.844 0.000642669 441.584 0.00125844 485.958 0.00644447 412.66 0.0541098 388.839 0.016443 431.155 0.0205425 365.959 0.015767 439.871 0.0579879 313.598 0.0178942 307.764 0.058827 338.788 0.00736307 246.3 0.0112874 318.413 0.00523208 280.525 0.0114572 273.651 0.00759402 268.219 0.00514545 257.93 0.00114772 267.166 0.018794 197.236 0.00251474 299.911 0.00574314 237.541 0.00198928 227.277 0.0133912 198.865 0.000454737 285.817 0.00528847 196.793 0.00491877 210.773 0.0174743 239.482 0.00786311 205.784 0.00652339 248.664 0.0109826 209.482 0.0214709 140.253 0.00196243 413.414 0.00921111 731.499 0.0610662 769.575 0.0256806 729.744 0.00263506 711.275 0.0033637 740.03 0.00828849 673.381 0.0255401 749.233 0.0191584 633.45 0.0291074 695.778 0.012591 748.357 0.077274 653.366 0.0765287 602.433 0.00070357 550.496 0.0204692 675.099 0.0345661 587.234 0.0403236 646.435 0.0549283 624.857 0.0213951 706.158 0.0424135 739.312 0.0406961 485.895 0.00257376 689.968 0.0292653 494.298 0.0314699 594.211 0.00704812 478.007 0.00801862 502.272 0.0323557 404.953 0.031035 378.624 0.0445271 386.971 0.0448159 436.205 0.00264761 593.591 0.024502 423.202 0.000117287 400.489 0.0424484 407.622 0.00330334 394.064 0.0674552 426.622 0.0696237 317.954 0.018586 376.583 0.0305435 340.417 0.0257955 317.572 0.0182304 378.848 0.00680598 271.26 0.0128144 373.065 0.00323251 312.496 0.000114928 276.799 0.0223909 230.084 0.0105473 247.672 0.0036985 231.619 0.0104263 248.641 0.00715702 208.893 0.00173638 241.04 0.0340593 195.059 0.00276683 219.701 0.00787296 194.079 0.00520206 230.434 0.0077585 260.437 0.0119648 220.574 0.00586253 211.59 0.00422476 237.112 0.021565 245.664 0.0299832 193.693 0.00349797 253.6 0.0112285 242.271 0.0114318 117.147 0.000620479 705.57 0.00427653 895.259 0.181323 770.879 0.043775 961.658 0.0220002 882.924 0.0641954 786.3 0.0738589 655.992 0.0706148 906.016 0.0974426 753.745 0.0490972 774.052 0.0874245 840.44 0.0169402 662.327 0.014044 660.508 0.0485504 660.521 0.00109597 724.22 0.005947 523.493 0.0164564 513.105 0.0146732 541.481 0.00651403 678.862 0.00349417 573.185 0.00159889 802.917 0.0429236 678.222 0.0520517 593.083 0.0168704 495.509 0.00155243 583.755 0.0327556 699.121 0.00188814 437.885 0.0678748 518.716 0.0175334 388.964 0.0099452 540.67 0.0250294 345.426 0.0185501 506.344 0.00369412 440.408 0.0297442 587.851 0.0441182 383.062 0.0339921 413.938 0.000854205 385.747 0.00180264 411.86 0.00346397 312.043 0.00408055 417.396 0.00102795 377.198 0.0174007 303.857 0.021468 285.569 0.0136738 295.942 0.000791643 347.897 0.0123769 258.836 0.0276437 333.695 0.0105296 261.955 0.0103781 309.152 9.82552e-005 327.505 0.00972513 277.091 0.0043737 277.728 0.0117006 239.639 0.00162563 208.902 0.0204247 205.111 0.0198722 291.553 0.0116755 243.147 0.0124723 300.168 0.000161901 231.825 0.00644288 333.39 0.00701261 206.019 0.00436731 402.439 0.0194184 252.334 0.00678385 116.495 0.000420519 708 0 1256.19 0.262271 1207.86 0.149885 1068.5 0.142444 1281.2 0.200632 967.024 0.0473356 1043.3 0.0555309 865.299 0.0887381 874.946 0.0848814 810.299 0.000107228 1132.11 0.0343828 633.242 0.00919817 794.579 0.0335508 616.884 0.00516261 843.72 0.0538873 556.267 0.0217846 989.304 0.0217001 525.535 0.0198812 773.074 0.0072922 685.465 0.00466959 597.521 0.00171237 600.407 0.0384154 562.712 0.0369988 492.951 0.0435165 552.64 0.0326909 492.544 0.00827582 461.807 0.00772907 439.873 0.00564166 484.622 0.0475485 444.397 0.0132911 425.651 0.00291719 445.747 0.032654 528.562 0.00567025 581.581 0.031784 449.752 0.0100063 618.872 0.0185742 357.728 0.00895302 394.97 0.0203353 404.221 0.00266255 373.696 0.00167969 415.363 0.0203366 300.44 0.00159365 452.683 0.071148 385.039 0.00212965 500.205 0.00775251 402.312 0.00796841 305.582 0.00849625 257.69 0.0324419 316.132 0.0115742 279.348 0.00515323 295.519 0.00351743 418.267 0.0247348 260.099 0.00267062 323.569 0.0198201 229.06 0.00272608 282.507 0.000761054 298.541 0.0539806 274.246 0.00303334 238.609 0.00404068 280.875 0.000821492 221.127 0.00617596 261.634 0.0123741 244.844 0.0053813 156 0 1698 53 37 0 28 0 28 0 12 0 20 0 29 0 24 0 18 0 26 0 32 0 9 0 12 0 10 0 17 0 27 0 11 0 10 0 15 0 19 0 37 1 43 0 14 0 16 0 12 0 21 0 24 0 52 2 85 3 20 0 20 0 24 0 21 0 33 1 47 2 169 8 212 14 41 0 34 0 27 0 34 0 23 0 35 0 87 1 259 10 86 7 19 0 28 0 35 2 34 1 40 3 30 0 88 2 116 4 100 4 35 0 16 0 22 0 23 0 34 0 32 0 50 1 51 0 118 0 101 5 35 1 15 0 11 0 20 0 26 0 27 0 35 1 49 1 110 1 131 0 81 1 33 2 28 1 15 0 12 0 11 0 14 0 16 0 20 0 29 0 41 0 89 0 36 0 24 0 21 0 17 0 11 0 10 0 13 0 17 0 19 0 31 0 33 0 56 1 90 1 57 0 28 0 31 0 31 1 24 0 13 0 15 0 17 0 12 0 18 0 29 0 44 4 63 5 80 3 46 2 37 1 21 0 24 0 28 0 34 0 11 0 18 0 27 0 35 0 51 1 56 1 41 0 90 2 122 5 75 9 26 0 18 0 15 0 13 0 13 0 10 0 20 0 24 0 42 0 51 0 70 1 63 0 112 0 67 2 36 1 16 0 17 0 13 0 11 0 6 0 29 0 32 0 60 1 77 2 133 0 172 0 83 1 34 1 31 1 15 0 15 0 15 0 17 0 23 0 29 0 44 0 54 0 175 0 54 0 26 0 21 0 18 0 9 0 10 0 7 0 36 0 36 1 91 2 100 0 77 1 29 0 31 0 24 0 25 0 12 0 8 0 57 3 64 5 115 5 63 2 44 1 21 0 26 0 28 1 33 1 11 0 133 15 228 23 75 12 49 0 44 1 25 0 30 1 31 2 42 2 186 19 76 8 33 1 19 0 22 0 12 0 13 0 10 0 84 10 30 1 24 0 16 0 15 0 8 0 8 0 40 3 17 0 16 0 13 0 13 0 6 0 35 1 17 0 21 0 14 0 18 0 24 0 11 0 14 0 6 0 26 1 12 0 11 0 33 1 11 0 42 0 126 22 727 203 1705 69 86 7 68 3 117 15 36 0 62 6 162 12 62 2 63 6 234 26 421 54 109 4 103 16 147 13 499 45 123 20 61 3 97 7 180 10 296 10 157 24 42 2 38 0 59 5 103 7 237 13 90 11 62 14 33 0 79 2 122 12 302 11 310 4 152 23 41 2 43 0 76 3 154 12 318 17 103 12 68 9 30 0 210 34 379 78 170 13 73 15 99 10 351 40 127 33 48 1 27 0 128 22 54 2 41 0 78 9 34 0 117 8 144 28 519 124 259 5 30 0 16 0 29 0 10 0 19 0 53 0 14 0 12 0 61 1 130 4 35 0 27 0 30 0 82 2 29 0 27 0 31 0 65 0 64 0 41 1 7 0 13 0 23 0 39 0 104 0 23 0 14 0 4 0 22 0 29 0 128 2 89 3 41 2 10 0 12 0 25 0 83 3 142 4 30 0 13 0 4 0 123 13 183 19 75 6 16 0 30 1 151 7 36 4 12 0 4 0 46 0 14 0 20 0 17 0 5 0 31 0 28 1 99 5 186 4 26 0 26 0 31 0 10 0 22 0 53 0 25 0 24 0 96 6 123 3 25 0 31 0 46 1 147 8 24 0 30 0 35 1 113 0 117 0 51 5 11 0 14 0 26 0 40 0 117 2 26 0 16 0 4 0 21 0 29 0 155 2 141 0 49 1 11 0 15 0 20 0 52 1 130 1 28 0 17 0 4 0 115 10 133 14 54 7 15 0 23 0 138 10 29 2 12 0 4 0 55 6 15 0 16 0 19 0 7 0 32 0 32 1 103 8 155 3 26 0 29 0 39 0 14 0 27 0 78 0 41 0 33 1 132 16 255 8 20 0 45 0 74 1 206 15 36 1 33 0 33 0 145 0 172 2 69 8 18 0 11 0 23 0 40 1 130 1 30 1 21 0 6 0 18 0 24 0 98 0 211 0 71 0 11 0 25 0 15 0 37 0 68 0 24 0 15 0 4 0 76 1 105 2 36 0 15 0 25 0 133 5 23 0 8 0 4 0 57 6 16 0 13 0 19 0 5 0 29 0 31 1 100 8 581 6 27 0 16 0 24 0 12 0 18 0 38 1 15 0 17 0 66 3 108 1 25 0 22 0 40 0 114 3 27 0 23 0 28 0 89 1 111 2 38 4 11 0 20 0 27 0 46 2 102 0 25 1 14 0 4 0 25 0 27 0 135 5 112 4 38 2 10 0 11 0 31 0 57 3 111 4 24 0 13 0 4 0 121 6 155 8 61 4 13 0 26 0 106 9 30 1 12 0 5 0 44 6 15 0 17 0 15 0 7 0 23 0 27 0 89 6 366 7 22 0 17 0 25 0 12 0 19 0 40 3 15 0 19 0 62 7 108 9 24 0 24 0 36 1 107 11 29 1 22 0 26 0 87 2 86 1 35 4 13 0 16 0 23 0 49 1 110 0 26 1 16 0 5 0 23 0 24 0 99 6 123 4 37 3 10 0 16 0 26 0 46 3 135 5 37 0 20 0 5 0 93 6 98 9 47 7 18 0 25 0 116 4 26 0 13 0 4 0 46 5 14 0 16 0 16 0 5 0 27 0 32 0 92 11 223 9 29 0 24 0 36 1 9 0 20 0 60 2 23 0 20 0 116 10 193 21 31 0 28 1 56 0 219 19 38 4 21 0 24 0 60 0 50 0 45 1 12 0 13 0 18 0 37 0 60 0 20 0 16 0 3 0 21 0 35 0 84 0 90 0 50 2 10 0 14 0 18 0 71 2 85 1 32 0 19 0 4 0 99 9 132 19 58 4 22 0 33 1 177 13 33 2 15 0 3 0 37 4 12 0 13 0 19 0 5 0 28 1 27 1 106 9 743 3 34 0 14 0 28 0 10 0 11 0 32 0 15 0 14 0 67 1 100 1 32 0 30 0 44 0 140 5 29 0 21 0 33 0 109 1 114 1 39 0 12 0 15 0 23 0 64 1 123 3 29 0 14 0 5 0 23 0 35 0 67 0 74 0 41 0 8 0 14 0 26 0 54 1 75 0 22 0 18 0 4 0 110 7 150 3 59 1 20 0 28 1 167 8 32 2 12 0 5 0 84 5 13 0 15 0 20 0 4 0 27 0 28 1 74 3 696 7 21 0 27 0 29 0 12 0 23 0 45 0 35 0 24 0 68 3 118 5 28 0 35 0 66 0 186 1 24 0 25 0 31 0 141 0 122 0 69 1 11 0 14 0 22 0 47 1 120 2 27 0 17 0 5 0 36 0 35 0 122 0 109 1 66 4 12 0 15 0 28 0 41 1 136 2 40 0 18 0 4 0 103 5 116 4 58 7 19 0 26 0 156 12 31 1 16 0 4 0 51 5 12 0 17 0 14 0 4 0 22 0 35 1 90 8 663 8 18 0 38 0 35 0 15 0 27 0 70 0 36 0 33 0 132 7 155 13 22 0 36 0 116 0 230 2 33 0 22 0 26 0 88 0 146 0 95 0 14 0 12 0 16 0 31 0 68 0 19 0 14 0 4 0 33 0 32 0 135 0 119 2 64 4 17 0 17 0 23 0 40 0 247 2 52 1 16 0 5 0 68 2 92 5 67 4 17 0 25 1 97 1 18 0 11 0 5 0 34 0 10 0 14 0 13 0 3 0 22 0 31 0 108 8 ================================================ FILE: C++/svm_model_NUAA ================================================ [File too large to display: 33.5 MB] ================================================ FILE: C++/test.cpp ================================================ #include"liveness.h" // Demo of Liveness Detection int main() { Test(); /* // Initialization ThuVisionFaceLiveCheck Check; bool Init_message = Check.Init(); if(Init_message == false) { std::cout << "Initialization failed. " << endl; return -1; } std::cout << "Initialized successfully. " << endl; // Check with Image Path string imgPath0 = "00000.png"; double value0 = Check.Check(imgPath0); cout << imgPath0 << " is a " << (value0 >= 0.5 ? "real" : "fake") << " face. " <= 0.5 ? "real" : "fake") << " face. " <=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}=i),mean(ImposterTestValue=i)+sum(ImposterTestValue 4 CorrectNoReal = CorrectNoReal + sum(flagSet{IdxSubject, IdxData}>=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}=i),mean(ImposterTestValue=i)+sum(ImposterTestValue 4 CorrectNoReal = CorrectNoReal + sum(flagSet{IdxSubject, IdxData}>=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}HighFrequencyRadius^2 && ClientTrainFFT(x,y)>=ThresholdFrequency HighFrequencyEnergy = HighFrequencyEnergy + ClientTrainFFT(x,y); end end end %% energy of all frequencies TotalEnergy = sum(ClientTrainFFT(:)) - sum(Image(:)); %% high frequency descriptor HFD = HighFrequencyEnergy / TotalEnergy; end ================================================ FILE: Matlab/HFDTest.m ================================================ % clear all, close all, clc %% read client and imposter testing data name ClientTestNormalizedName = importdata('./NUAA/client_test_normalized.txt'); ClientTestNormalizedNumber = size(ClientTestNormalizedName, 1); ImposterTestNormalizedName = importdata('./NUAA/imposter_test_normalized.txt'); ImposterTestNormalizedNumber = size(ImposterTestNormalizedName, 1); figure; color = 'brgymck'; ThresholdFrequency = [0, 10, 20, 50, 100, 200, 500]; for n = 1 : 7 %% HFD of client Testing data ClientTestHFD = zeros(1, ClientTestNormalizedNumber); for i = 1 : ClientTestNormalizedNumber ClientTest = imread(['./NUAA/ClientNormalized/' ClientTestNormalizedName{i}]); ClientTestHFD(i) = HFD(ClientTest, ThresholdFrequency(n)); end %% HFD of imposter Testing data ImposterTestHFD = zeros(1, ImposterTestNormalizedNumber); for i = 1 : ImposterTestNormalizedNumber ImposterTest = imread(['./NUAA/ImposterNormalized/' ImposterTestNormalizedName{i}]); ImposterTestHFD(i) = HFD(ImposterTest, ThresholdFrequency(n)); end %% ROC curve Thfd = 0 : 0.001 :0.5; sensitivity = [1, size(Thfd, 2)]; specificity = [1, size(Thfd, 2)]; for i = 1 : size(Thfd, 2) %% sensitivity and specificity true_positive = sum(ClientTestHFD >= Thfd(i)); true_negative = sum(ImposterTestHFD < Thfd(i)); false_positive = sum(ImposterTestHFD >= Thfd(i)); false_negative = sum(ClientTestHFD < Thfd(i)); sensitivity(i) = true_positive/(true_positive+false_negative); specificity(i) = true_negative/(false_positive+true_negative); end hold on plot(1-specificity, sensitivity, color(n)) end ================================================ FILE: Matlab/HFDTrain.m ================================================ clear all, close all, clc %% read client and imposter training data name ClientTrainNormalizedName = importdata('./NUAA/client_train_normalized.txt'); ClientTrainNormalizedNumber = size(ClientTrainNormalizedName, 1); ImposterTrainNormalizedName = importdata('./NUAA/imposter_train_normalized.txt'); ImposterTrainNormalizedNumber = size(ImposterTrainNormalizedName, 1); addpath('./libsvm-3.19/matlab'); figure; color = 'brgymck'; ThresholdFrequency = [0, 10, 20, 50, 100, 200, 500]; for n = 1 : 7 %% HFD of client training data ClientTrainHFD = zeros(1, ClientTrainNormalizedNumber); for i = 1 : ClientTrainNormalizedNumber ClientTrain = imread(['./NUAA/ClientNormalized/' ClientTrainNormalizedName{i}]); ClientTrainHFD(i) = HFD(ClientTrain, ThresholdFrequency(n)); end %% HFD of imposter training data ImposterTrainHFD = zeros(1, ImposterTrainNormalizedNumber); for i = 1 : ImposterTrainNormalizedNumber ImposterTrain = imread(['./NUAA/ImposterNormalized/' ImposterTrainNormalizedName{i}]); ImposterTrainHFD(i) = HFD(ImposterTrain, ThresholdFrequency(n)); end %% ROC curve Thfd = 0 : 0.001 :0.5; sensitivity = [1, size(Thfd, 2)]; specificity = [1, size(Thfd, 2)]; for i = 1 : size(Thfd, 2) %% sensitivity and specificity true_positive = sum(ClientTrainHFD >= Thfd(i)); true_negative = sum(ImposterTrainHFD < Thfd(i)); false_positive = sum(ImposterTrainHFD >= Thfd(i)); false_negative = sum(ClientTrainHFD < Thfd(i)); sensitivity(i) = true_positive/(true_positive+false_negative); specificity(i) = true_negative/(false_positive+true_negative); end hold on plot(1-specificity, sensitivity, color(n)) end ================================================ FILE: Matlab/HOOF/README ================================================ This code has been provided only for research purposes. If you want to use this for commerical purposes, you will need an appropriate license. Contact the email address below. Although care has been taken to collect this code, we do not assume any liability for any errors or incomplete files. Moreover, we are not responsible for any loss, financial or physical, that results from any use of whole or part of the provided code in any situation. If you decide to use this code and report results in a publication, please refer to the publication: R. Chaudhry, A. Ravichandran, G. Hager and R. Vidal Histograms of Oriented Optical Flow and Binet-Cauchy Kernels on Nonlinear Dynamical Systems for the Recognition of Human Actions CVPR 2009 (c) Rizwan Chaudhry - JHU Vision Lab For questions and bug reports, contact Rizwan Chaudhry at rizwanch@cis.jhu.edu Usage: gradientHistogram.m Extract HOOF features from a frame of optical flow identifySestemUsingKPCA.m Use predefined kernels (in this case the ones provided for histograms) to compute the system parameters for the NLDS using KPCA. computeDistanceModularHistogram MDPA distance between two modular histograms. computeDistanceOrdinalHistogram MDPA distance between two ordinal (regular) histograms. chiSquareDist.m Chi-square distance between two histograms. histKernel.m Histogram intersection kernel computeDistancesBetweenKPCASystems.m Compute several all-pair distances between NLDS identified using the appropriate kernels findSubspaceAnglesBetweenKPCASystems.m Compute subspace angles between NLDS to compute Martin distance traceKernelKPCASystems.m Compute the Binet-Cauchy trace kernel between NLDS For faster implementation when the kernel used is the square-root representation, use PCA on the square-root representation and use regular metrics for LDS. findSubspaceAnglesBetweenKPCASystemsSqrtHist.m traceKernelKPCASystemsSqrtHist ================================================ FILE: Matlab/HOOF/README~ ================================================ This code has been provided only for research purposes. If you want to use this for commerical purposes, you will need an appropriate license. Contact the email address below. Although care has been taken to collect this code, we do not assume any liability for any errors or incomplete files. Moreover, we are not responsible for any loss, financial or physical, that results from any use of whole or part of the provided code in any situation. If you decide to use this code and report results in a publication, please refer to the publication: R. Chaudhry, A. Ravichandran, G. Hager and R. Vidal Histograms of Oriented Optical Flow and Binet-Cauchy Kernels on Nonlinear Dynamical Systems for the Recognition of Human Actions CVPR 2009 (c) Rizwan Chaudhry - JHU Vision Lab Usage: gradientHistogram.m Extract HOOF features from a frame of optical flow identifySestemUsingKPCA.m Use predefined kernels (in this case the ones provided for histograms) to compute the system parameters for the NLDS using KPCA. computeDistanceModularHistogram MDPA distance between two modular histograms. computeDistanceOrdinalHistogram MDPA distance between two ordinal (regular) histograms. chiSquareDist.m Chi-square distance between two histograms. histKernel.m Histogram intersection kernel computeDistancesBetweenKPCASystems.m Compute several all-pair distances between NLDS identified using the appropriate kernels findSubspaceAnglesBetweenKPCASystems.m Compute subspace angles between NLDS to compute Martin distance traceKernelKPCASystems.m Compute the Binet-Cauchy trace kernel between NLDS For faster implementation when the kernel used is the square-root representation, use PCA on the square-root representation and use regular metrics for LDS. findSubspaceAnglesBetweenKPCASystemsSqrtHist.m traceKernelKPCASystemsSqrtHist ================================================ FILE: Matlab/HOOF/chiSquareDist.m ================================================ function distance = chiSquareDist(A) % Caclulate Chi Squared for a vector of Histograms L = A; t = size(L,2); distance = zeros(t,t); for i=1:t temp = repmat(L(:,i),1,t); G = (temp+L>0); distance(i,:) = sum(G.*[(temp - L).^2]./ (G.*[temp+L]+not(G)),1) ; end ================================================ FILE: Matlab/HOOF/computeDistanceModularHistogram.m ================================================ function dist = computeDistanceModularHistogram(hist1, hist2) % dist = computeDistanceModularHistogram(hist1, hist2) % % Computes the distance between two modular histograms. Modular histograms are histograms formed from % modular data such as angles etc % % Implementation of the MDPA (Minimum Distance of Pair Assignments) algorithm in % S. -H. Cha, S.N. Srihari, On measuring the distance between histograms, Pattern Recognition, 35 (2002) 1355-1370 % % (c) Rizwan Chaudhry - JHU Vision Lab % Assuming both histograms have the same number of bins histDiff = hist1-hist2; prefixsum = cumsum(histDiff); h_dist = sum(abs(prefixsum)); dist = h_dist; dist_increased = 0; while dist_increased == 0 d = min(prefixsum(prefixsum > 0)); if isempty(d) == 1 break; end tempprefixsum = prefixsum - repmat(d,size(prefixsum)); h_dist2 = sum(abs(tempprefixsum)); if h_dist2 < h_dist h_dist = h_dist2; prefixsum = tempprefixsum; else dist_increased = 1; end end dist_increased = 0; while dist_increased == 0 d = max(prefixsum(prefixsum < 0)); if isempty(d) == 1 break; end tempprefixsum = prefixsum - repmat(d,size(prefixsum)); h_dist2 = sum(abs(tempprefixsum)); if h_dist2 < h_dist h_dist = h_dist2; prefixsum = tempprefixsum; else dist_increased = 1; end end dist = h_dist; ================================================ FILE: Matlab/HOOF/computeDistanceOrdinalHistogram.m ================================================ function dist = computeDistanceOrdinalHistogram(hist1, hist2) % dist = computeDistanceOrdinalHistogram(hist1, hist2) % % Computes the distance between two ordinal histograms. Ordinal histograms are histograms formed from % ordinal data such as linear intervals etc % % Implementation of the MDPA (Minimum Distance of Pair Assignments) algorithm in % S. -H. Cha, S.N. Srihari, On measuring the distance between histograms, Pattern Recognition, 35 (2002) 1355-1370 % % (c) Rizwan Chaudhry - JHU Vision Lab % Assuming both histograms have the same number of bins histDiff = hist1-hist2; prefixsum = cumsum(histDiff); h_dist = sum(abs(prefixsum)); dist = h_dist; ================================================ FILE: Matlab/HOOF/computeDistancesBetweenKPCASystems.m ================================================ function distances = computeDistancesBetweenKPCASystems(sysParams,metric,kernel) % function distances = % computeDistancesBetweenKPCASystems(sysParams,metric,kernel) % % Computes the required kernel distance % % (c) Rizwan Chaudhry - JHU Vision Lab % kernelName{1} = 'Geodesic'; kernelName{2} = 'MDPA-ordinal'; kernelName{3} = 'ChiSquare'; kernelName{4} = 'HIST'; metricName{1} = 'Martin'; metricName{2} = 'BC-trace'; metricName{3} = 'BC-init-ind'; lambda = 0.9; % Parameter for Binet Cauchy kernels % Compute all pairwise sequence kernels %disp('Computing all pairwise sequence kernels'); for ind_i = 1:length(sysParams) for ind_j = 1:ind_i Y_12 = double([sysParams{ind_i}.Yoriginal, sysParams{ind_j}.Yoriginal]); % Evaluate the kernel on these vectors; kernel_12 = zeros(size(Y_12,2),'double'); % Evaluate the kernel on these vectors; if strcmp(kernelName{kernel}, 'Geodesic') Y_12 = sqrt(Y_12); kernel_12 = Y_12'*Y_12; elseif strcmp(kernelName{kernel}, 'MDPA-ordinal') for i=1:size(Y_12,2) for j =1:i-1 kernel_12(i,j) = computeDistanceOrdinalHistogram(Y_12(:,i),Y_12(:,j)); % MDPA end end kernel_12 = kernel_12 + kernel_12'; kernel_12 = exp(-(kernel_12.^2)); elseif strcmp(kernelName{kernel}, 'ChiSquare') kernel_12 = exp(-(chiSquareDist(Y_12).^2)); elseif strcmp(kernelName{kernel}, 'HIST') for i=1:size(Y_12,2) for j = 1:i kernel_12(i,j) = histogramKernel(Y_12(:,i),Y_12(:,j)); end end kdiag = diag(kernel_12); kernel_12 = kernel_12 + kernel_12' - diag(kdiag); end allPairWiseKernels{ind_i,ind_j} = kernel_12; end end distances = zeros(length(sysParams),length(sysParams),length(metric)); for m = 1:length(metric) if strcmp(metricName{metric(m)},'Martin') == 1 %disp('Martin distance'); for ind_i = 1:length(sysParams) for ind_j = 1:ind_i sysParams1 = sysParams{ind_i}; sysParams2 = sysParams{ind_j}; kernel_12 = allPairWiseKernels{ind_i,ind_j}; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); order = min(sysParams1.order,sysParams2.order); % alphaPrime1 = sysParams1.alpha; % alphaPrime2 = sysParams2.alpha; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_11 = alphaPrime1'*kernel_12(1:N1,1:N1)*alphaPrime1; F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; F_21 = alphaPrime2'*kernel_12(N1+1:end,1:N1)*alphaPrime1; F_22 = alphaPrime2'*kernel_12(N1+1:end,N1+1:end)*alphaPrime2; % % M_11 = dlyap(sysParams1.A',sysParams1.A,F_11); % M_12 = dlyap(sysParams1.A',sysParams2.A,F_12); % M_21 = dlyap(sysParams2.A',sysParams1.A,F_21); % M_22 = dlyap(sysParams2.A',sysParams2.A,F_22); % % evals = eig(pinv(M_11)*M_12*pinv(M_22)*M_21); % % angles = real(acos(sqrt(evals(1:order)))); Ft = [F_11,F_12;F_21,F_22]; At = [sysParams1.A,zeros(order);zeros(order),sysParams2.A]; M = dlyap(At',Ft); evals = eig([zeros(order) pinv(M(1:order,1:order))*M(1:order,order+1:2*order);... pinv(M(order+1:2*order,order+1:2*order))*M(order+1:2*order,1:order) zeros(order)]); evals = real(evals); evals = max(-ones(size(evals)),evals); evals = min(ones(size(evals)),evals); evals = sort(evals,'descend'); angles = real(acos(evals(1:order))); distances(ind_i,ind_j,m) = sqrt(-sum(log((cos(angles)).^2))); distances(ind_j,ind_i,m) = distances(ind_i,ind_j,m); end end elseif strcmp(metricName{metric(m)},'BC-trace') == 1 %disp('Binet Cauchy Kernel'); for ind_i = 1:length(sysParams) for ind_j = 1:ind_i sysParams1 = sysParams{ind_i}; sysParams2 = sysParams{ind_j}; kernel_12 = allPairWiseKernels{ind_i,ind_j}; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; M_12 = dlyap(lambda*sysParams1.A',sysParams2.A,F_12); M_12 = real(M_12); % Check for numerical errors due to very small eigenvalues % of Q % [V1,D1] = eig(sysParams1.Q); % if any(diag(D1) <= 0) % diag1 = diag(D1); % diag1(diag1 <= 0) = min(abs(diag1)); % D1 = diag(diag1); % sysParams1.Q = V1*D1*V1'; % end % [V2,D2] = eig(sysParams2.Q); % if any(diag(D2) <= 0) % diag2 = diag(D2); % diag2(diag2 <= 0) = min(abs(diag2)); % D2 = diag(diag2); % sysParams2.Q = V2*D2*V2'; % end % Regularize Qs with 1 sysParams1.Q = sysParams1.Q + eps*eye(size(sysParams1.Q)); sysParams2.Q = sysParams2.Q + eps*eye(size(sysParams2.Q)); B1 = real(chol(sysParams1.Q))'; B2 = real(chol(sysParams2.Q))'; kernel = sysParams1.X(:,1)'*M_12*sysParams2.X(:,1) + lambda/(1-lambda)*trace(B1'*M_12*B2); distances(ind_i,ind_j,m) = kernel; distances(ind_j,ind_i,m) = kernel; end end elseif strcmp(metricName{metric(m)},'BC-init-ind') == 1 %disp('Initial state independent Binet Cauchy Kernel'); for ind_i = 1:length(sysParams) for ind_j = 1:ind_i sysParams1 = sysParams{ind_i}; sysParams2 = sysParams{ind_j}; kernel_12 = allPairWiseKernels{ind_i,ind_j}; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; M_12 = dlyap(lambda*sysParams1.A',sysParams2.A,F_12); M_12 = real(M_12); kernel = max(svd(M_12)); distances(ind_i,ind_j,m) = kernel; distances(ind_j,ind_i,m) = kernel; end end end end ================================================ FILE: Matlab/HOOF/findSubspaceAnglesBetweenKPCASystems.m ================================================ function angles = findSubspaceAnglesBetweenKPCASystems(sysParams1, sysParams2) % angles = findSubspaceAnglesBetweenKPCASystems(sysParams1,sysParams2) % % Finds subspace angles between two systems identified using KPCA % % (c) Rizwan Chaudhry - JHU Vision Lab Y_12 = [sysParams1.Yoriginal, sysParams2.Yoriginal]; % Evaluate the kernel on these vectors; kernel_12 = zeros(size(Y_12,2)); for i=1:length(Y_12) for j =1:i-1 % Choose appropriate kernel here kernel_12(i,j) = computeDistanceModularHistogram(Y_12(:,i),Y_12(:,j)); % MDPA end end kernel_12 = kernel_12 + kernel_12'; kernel_12 = exp(-kernel_12.^2); N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); e1 = ones(1,N1)'; e2 = ones(1,N2)'; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_11 = alphaPrime1'*kernel_12(1:N1,1:N1)*alphaPrime1; F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; F_21 = alphaPrime2'*kernel_12(N1+1:end,1:N1)*alphaPrime1; F_22 = alphaPrime2'*kernel_12(N1+1:end,N1+1:end)*alphaPrime2; M_11 = dlyap(sysParams1.A',sysParams1.A,F_11); M_12 = dlyap(sysParams1.A',sysParams2.A,F_12); M_21 = dlyap(sysParams2.A',sysParams1.A,F_21); M_22 = dlyap(sysParams2.A',sysParams2.A,F_22); lambda = eig(pinv(M_11)*M_12*pinv(M_22)*M_21); lambda = real(lambda); lambda = max(zeros(size(lambda)),lambda); lambda = min(ones(size(lambda)),lambda); lambda = sort(lambda,'descend'); lambda = sqrt(lambda); order = min(sysParams1.order,sysParams2.order); angles = real(acos(lambda(1:order))); ================================================ FILE: Matlab/HOOF/findSubspaceAnglesBetweenKPCASystemsSqrtHist.asv ================================================ function angles = findSubspaceAnglesBetweenKPCASystemsSqrtHist(sysParams1, sysParams2) % angles = findSubspaceAnglesBetweenKPCASystems(sysParams1,sysParams2) % % Finds subspace angles between two systems identified using KPCA % % (c) Rizwan Chaudhry - JHU Vision Lab Y_12 = [sysParams1.Yoriginal, sysParams2.Yoriginal]; % Evaluate the kernel on these vectors; Y_12 = sqrt(Y_12); kernel_12 = Y_12'*Y_12; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); e1 = ones(1,N1)'; e2 = ones(1,N2)'; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_11 = alphaPrime1'*kernel_12(1:N1,1:N1)*alphaPrime1; F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; F_21 = alphaPrime2'*kernel_12(N1+1:end,1:N1)*alphaPrime1; F_22 = alphaPrime2'*kernel_12(N1+1:end,N1+1:end)*alphaPrime2; M_11 = dlyap(sysParams1.A',sysParams1.A',F_11); M_12 = dlyap(sysParams1.A',sysParams2.A',F_12); M_21 = dlyap(sysParams2.A',sysParams1.A',F_21); M_22 = dlyap(sysParams2.A',sysParams2.A',F_22); lambda = eig(pinv(M_11)*M_12*pinv(M_22)*M_21); lambda = real(lambda); lambda = max(zeros(size(lambda)),lambda); lambda = min(ones(size(lambda)),lambda); lambda = sort(lambda,'descend'); lambda = sqrt(lambda); order = min(sysParams1.order,sysParams2.order); angles = real(acos(lambda(1:order))); ================================================ FILE: Matlab/HOOF/findSubspaceAnglesBetweenKPCASystemsSqrtHist.m ================================================ function angles = findSubspaceAnglesBetweenKPCASystemsSqrtHist(sysParams1, sysParams2) % angles = findSubspaceAnglesBetweenKPCASystems(sysParams1,sysParams2) % % Finds subspace angles between two systems identified using KPCA % % (c) Rizwan Chaudhry - JHU Vision Lab Y_12 = [sysParams1.Yoriginal, sysParams2.Yoriginal]; % Evaluate the kernel on these vectors; Y_12 = sqrt(Y_12); kernel_12 = Y_12'*Y_12; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); e1 = ones(1,N1)'; e2 = ones(1,N2)'; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_11 = alphaPrime1'*kernel_12(1:N1,1:N1)*alphaPrime1; F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; F_21 = alphaPrime2'*kernel_12(N1+1:end,1:N1)*alphaPrime1; F_22 = alphaPrime2'*kernel_12(N1+1:end,N1+1:end)*alphaPrime2; M_11 = dlyap(sysParams1.A',sysParams1.A,F_11); M_12 = dlyap(sysParams1.A',sysParams2.A,F_12); M_21 = dlyap(sysParams2.A',sysParams1.A,F_21); M_22 = dlyap(sysParams2.A',sysParams2.A,F_22); lambda = eig(pinv(M_11)*M_12*pinv(M_22)*M_21); lambda = real(lambda); lambda = max(zeros(size(lambda)),lambda); lambda = min(ones(size(lambda)),lambda); lambda = sort(lambda,'descend'); lambda = sqrt(lambda); order = min(sysParams1.order,sysParams2.order); angles = real(acos(lambda(1:order))); ================================================ FILE: Matlab/HOOF/gradientHistogram.m ================================================ function ohog = gradientHistogram(Fx,Fy,binSize) % Compute HOOF feature % INPUTS % Fx - X-flow % Fy - Y-flow % binSize - number of bins used % % OUTPUTS % ohog - output histogram of oriented optical flow % % EXAMPLE % %% Written by : Rizwan Chaudhry and Avinash Ravichandran %% $DATE : 28-Aug-2008 11:00:58 $ %% $Revision : 1.00 $ %% Matlab : 7.4.0.287 (R2007a) %% FILENAME : gradientHistogram.m % % (c) Rizwan Chaudhry, Avinash Ravichandran - JHU Vision Lab %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %gradientHistogram.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% magnitudeImage = (Fx.^2 + Fy.^2 ).^0.5; orientationImage = atan2(Fy,Fx); greaterPiBy2Index = orientationImage > pi/2; smallerMinusPiBy2Index = orientationImage < -pi/2; remainingIndex = orientationImage <=pi/2 & orientationImage >= -pi/2; greaterPiBy2Mat = greaterPiBy2Index.*orientationImage; smallerMinusPiBy2Mat = smallerMinusPiBy2Index.*orientationImage; remainingMat = remainingIndex.*orientationImage; piMat = pi*ones(size(orientationImage)); convertGreaterPiBy2Mat = greaterPiBy2Index.*piMat - greaterPiBy2Mat; convertSmallerMinusPiBy2Mat = smallerMinusPiBy2Index.*(-piMat) - smallerMinusPiBy2Mat; newOrientationImage = convertGreaterPiBy2Mat + remainingMat + convertSmallerMinusPiBy2Mat; % [hog,idx] = % histc(reshape(orientationImage,1,[]),linspace(-pi,pi,binSize+1) ); [hog,idx] = histc(reshape(newOrientationImage,1,[]),linspace(-pi/2,pi/2,binSize+1) ); values = reshape(magnitudeImage,1,[]); for k=1:binSize bin(k) = sum(values(find(idx==k))); end ohog = bin/sum(bin); ohog = ohog'; ================================================ FILE: Matlab/HOOF/histogramKernel.m ================================================ function [ output ] = histogramKernel( hist1, hist2 ) %HISTOGRAMKERNEL find the 'histogram kernel' between time series of %histograms % This test code implements a so-called histogram intersection kernel for % histogram time series data by extending the original histogram kernel. % % Parameters: % hist1: first normalized to 1 histogram of size d1 bins x N1 samples % hist2: second normalized to 1 histogram of size d2 bins x N2 samples % Outputs: % output: the value of the histogram kernel between two histogram % time series % % (c) Rizwan Chaudhry - JHU Vision Lab [d1, N1] = size(hist1); [d2, N2] = size(hist2); if d1 ~= d2 error('Number of bins in the histograms must be the same'); end % TODO: check for normalization N = min(N1,N2); output = sum(sum(min(hist1(:,1:N), hist2(:,1:N)),1))/N; ================================================ FILE: Matlab/HOOF/identifySystemUsingKPCA.m ================================================ function sysParams = identifySystemUsingKPCA(Yoriginal,kernelMatrix, order) % sysParams = identifySystemUsingKPCA(Yoriginal, kernelMatrix, order) % % Takes as input the kernel computed on the output trajectory of a sequence % and computes the relevant system parameters as mentioned in A.B.Chan CVPR % 07 % (c) Rizwan Chaudhry - JHU Vision Lab K = double(kernelMatrix); N = size(kernelMatrix,1); e = ones(1,N)'; KTilde = (eye(N)-e*e'/N)*K*(eye(N)-e*e'/N); % remove any numerical inconsistencies by making KTilde symmetric KTilde = (KTilde + KTilde')/2; [V,D] = eig(KTilde); d = real(diag(D))'; % Format data such that the eigen values and corresponding eigen vectors % are listed in descending order V = V(:,end:-1:1); d = d(end:-1:1); alpha = V./sqrt(repmat(d,size(V,1),1)); X = alpha'*KTilde; X = X(1:order,:); alpha = alpha(:,1:order); A = X(:,2:end)*pinv(X(:,1:end-1)); V = zeros(order,N); V(:,2:end) = X(:,2:end)-A*X(:,1:end-1); Q = zeros(size(V,1),size(V,1)); for i=1:N-1 Q = Q + V(:,i)*V(:,i)'; end Q = 1/(N-1)*Q; % Y - minimum norm reconstruction % R sysParams.A = A; sysParams.alpha = alpha; sysParams.X = X; sysParams.K = K; sysParams.KTilde = KTilde; sysParams.Yoriginal = Yoriginal; sysParams.Q = Q; sysParams.order = order; ================================================ FILE: Matlab/HOOF/traceKernelKPCASystems.m ================================================ function kernel = traceKernelKPCASystems(sysParams1, sysParams2, lambda) % (c) Rizwan Chaudhry - JHU Vision Lab Y_12 = [sysParams1.Yoriginal, sysParams2.Yoriginal]; % Evaluate the kernel on these vectors; kernel_12 = zeros(size(Y_12,2)); for i=1:length(Y_12) for j =1:i-1 % Choose appropriate kernel here kernel_12(i,j) = computeDistanceModularHistogram(Y_12(:,i),Y_12(:,j)); % MDPA end end kernel_12 = kernel_12 + kernel_12'; kernel_12 = exp(-kernel_12.^2); N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); e1 = ones(1,N1)'; e2 = ones(1,N2)'; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; M_12 = dlyap(lambda*sysParams1.A',sysParams2.A,F_12); M_12 = real(M_12); B1 = real(chol(sysParams1.Q,'lower')); B2 = real(chol(sysParams2.Q,'lower')); kernel = sysParams1.X(:,1)'*M_12*sysParams2.X(:,1) + lambda/(1-lambda)*trace(B1'*M_12*B2); ================================================ FILE: Matlab/HOOF/traceKernelKPCASystemsSqrtHist.m ================================================ function kernel = traceKernelKPCASystemsSqrtHist(sysParams1, sysParams2, lambda) % (c) Rizwan Chaudhry - JHU Vision Lab Y_12 = [sysParams1.Yoriginal, sysParams2.Yoriginal]; % Evaluate the kernel on these vectors; Y_12 = sqrt(Y_12); kernel_12 = Y_12'*Y_12; N1 = size(sysParams1.Yoriginal,2); N2 = size(sysParams2.Yoriginal,2); e1 = ones(1,N1)'; e2 = ones(1,N2)'; alphaPrime1 = sysParams1.alpha-1/N1*(repmat(sum(sysParams1.alpha,1),size(sysParams1.alpha,1),1)); alphaPrime2 = sysParams2.alpha-1/N2*(repmat(sum(sysParams2.alpha,1),size(sysParams2.alpha,1),1)); F_12 = alphaPrime1'*kernel_12(1:N1,N1+1:end)*alphaPrime2; M_12 = dlyap(lambda*sysParams1.A',sysParams2.A,F_12); M_12 = real(M_12); B1 = real(chol(sysParams1.Q,'lower')); B2 = real(chol(sysParams2.Q,'lower')); kernel = sysParams1.X(:,1)'*M_12*sysParams2.X(:,1) + lambda/(1-lambda)*trace(B1'*M_12*B2); ================================================ FILE: Matlab/HOOF.m ================================================ function Feature = HOOF(OF, bins, blocks) Feature = zeros(1, bins * blocks * blocks); [h, w] = size(OF); OF(isnan(OF)) = 0; for iBlock = 1 : blocks for jBlock = 1 : blocks Feature(((iBlock - 1) * blocks + jBlock - 1) * bins + 1 : ((iBlock - 1) * blocks + jBlock - 1) * bins + bins) = ... gradientHistogram(... real(OF(round(1+h*(iBlock-1)/(blocks+1)):round(h*(iBlock+1)/(blocks+1)), round(1+w*(jBlock-1)/(blocks+1)):round(w*(jBlock+1)/(blocks+1)))), ... imag(OF(round(1+h*(iBlock-1)/(blocks+1)):round(h*(iBlock+1)/(blocks+1)), round(1+w*(jBlock-1)/(blocks+1)):round(w*(jBlock+1)/(blocks+1)))), ... bins)'; end end Feature(isnan(Feature)) = 0; end ================================================ FILE: Matlab/HSoptflow.m ================================================ function [us,vs] = HSoptflow(Xrgb,n) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Author: Gregory Power gregory.power@wpafb.af.mil % This MATLAB code shows a Motion Estimation map created by % using a Horn and Schunck motion estimation technique on two % consecutive frames. Input requires. % Xrgb(h,w,d,N) where X is a frame sequence of a certain % height(h), width (w), depth (d=3 for color), % and number of frames (N). % n= is the starting frame number which is less than N % V= the output variable which is a 2D velocity array % % Sample Call: V=HSoptflow(X,3); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [h,w,d,N]=size(Xrgb); if n>N-1 error(1,'requested file greater than frame number required'); end; %get two image frames if d==1 Xn=double(Xrgb(:,:,1,n)); Xnp1=double(Xrgb(:,:,1,n+1)); elseif d==3 Xn=double(Xrgb(:,:,1,n)*0.299+Xrgb(:,:,2,n)*0.587+Xrgb(:,:,3,n)*0.114); Xnp1=double(Xrgb(:,:,1,n+1)*0.299+Xrgb(:,:,2,n+1)*0.587+Xrgb(:,:,3,n+1)*0.114); else error(2,'not an RGB or Monochrome image file'); end; %get image size and adjust for border size(Xn); hm5=h-5; wm5=w-5; z=zeros(h,w); v1=z; v2=z; %initialize dsx2=v1; dsx1=v1; dst=v1; alpha2=625; imax=20; %Calculate gradients dst(5:hm5,5:wm5) = ( Xnp1(6:hm5+1,6:wm5+1)-Xn(6:hm5+1,6:wm5+1) + Xnp1(6:hm5+1,5:wm5)-Xn(6:hm5+1,5:wm5)+ Xnp1(5:hm5,6:wm5+1)-Xn(5:hm5,6:wm5+1) +Xnp1(5:hm5,5:wm5)-Xn(5:hm5,5:wm5))/4; dsx2(5:hm5,5:wm5) = ( Xnp1(6:hm5+1,6:wm5+1)-Xnp1(5:hm5,6:wm5+1) + Xnp1(6:hm5+1,5:wm5)-Xnp1(5:hm5,5:wm5)+ Xn(6:hm5+1,6:wm5+1)-Xn(5:hm5,6:wm5+1) +Xn(6:hm5+1,5:wm5)-Xn(5:hm5,5:wm5))/4; dsx1(5:hm5,5:wm5) = ( Xnp1(6:hm5+1,6:wm5+1)-Xnp1(6:hm5+1,5:wm5) + Xnp1(5:hm5,6:wm5+1)-Xnp1(5:hm5,5:wm5)+ Xn(6:hm5+1,6:wm5+1)-Xn(6:hm5+1,5:wm5) +Xn(5:hm5,6:wm5+1)-Xn(5:hm5,5:wm5))/4; for i=1:imax delta=(dsx1.*v1+dsx2.*v2+dst)./(alpha2+dsx1.^2+dsx2.^2); v1=v1-dsx1.*delta; v2=v2-dsx2.*delta; end; u=z; u(5:hm5,5:wm5)=v1(5:hm5,5:wm5); v=z; v(5:hm5,5:wm5)=v2(5:hm5,5:wm5); xskip=round(h/64); [hs,ws]=size(u(1:xskip:h,1:xskip:w)); us=zeros(hs,ws); vs=us; N=xskip^2; for i=1:hs-1 for j=1:ws-1 hk=i*xskip-xskip+1; hl=i*xskip; wk=j*xskip-xskip+1; wl=j*xskip; us(i,j)=sum(sum(u(hk:hl,wk:wl)))/N; vs(i,j)=sum(sum(v(hk:hl,wk:wl)))/N; end; end; figure(1); quiver(us,vs); colormap('default'); axis ij; axis tight; axis equal; end ================================================ FILE: Matlab/LBP_CASIA_Test.m ================================================ % clear all, close all, clc % % %% read client and imposter testing data name % addpath('./libsvm-3.19/matlab'); % addpath('./lbp-0.3.3'); % Map_u2_16 = getmapping(16, 'u2'); % Map_u2_8 = getmapping(8, 'u2'); % load LBP_SVM_CASIA.mat % % %% extract feature % detector = vision.CascadeObjectDetector('MinSize', [100,100]); % flagSet = cell(30, 8); % for IdxSubject = 1 : 30 % for IdxData = 1 : 8 % if IdxData <= 8 % Name = ['./CASIA/test_release/' num2str(IdxSubject) '/' num2str(IdxData) '.avi']; % else % Name = ['./CASIA/test_release/' num2str(IdxSubject) '/HR_' num2str(IdxData-8) '.avi']; % end % Mov = VideoReader(Name); % NumFrame = Mov.NumberOfFrames; % flag = []; % for IdxFrame = 1 : NumFrame % data = read(Mov, IdxFrame); % box = step(detector, data); % if size(box, 1) == 1 % frame_now = rgb2gray(imresize(data(box(2):box(2)+box(4), box(1):box(1)+box(3), :), [64,64])); % TestFeature = LBP_feature(frame_now, Map_u2_16, Map_u2_8); % TestFeature = (TestFeature-MinMax(1,:))./(MinMax(2,:)-MinMax(1,:)); % [TestLabel, TestAccuracy, TestValue] = svmpredict(1, TestFeature, model, '-q'); % flag = [flag,TestValue]; % end % end % flagSet{IdxSubject, IdxData} = flag; % disp([num2str(IdxSubject) ', ' num2str(IdxData)]) % clear Mov; % end % end % save LBP_SVM_CASIA_testfeature.mat flagSet %% testing load LBP_SVM_CASIA_testfeature.mat flagSet DataCorrectRate = zeros(3, 601); CorrectRate = zeros(3, 601); for Bias = -3:0.01:3; CorrectNoReal = 0; CorrectNoFake = 0; TotalNoReal = 0; TotalNoFake = 0; DataCorrectNoReal = 0; DataCorrectNoFake = 0; for IdxSubject = 1 : 30 for IdxData = 1 : 8 if IdxData <= 2 CorrectNoReal = CorrectNoReal + sum(flagSet{IdxSubject, IdxData}>=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}=i),mean(ImposterTestValue=i)+sum(ImposterTestValue 4 CorrectNoReal = CorrectNoReal + sum(flagSet{IdxSubject, IdxData}>=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData} 4 CorrectNoReal = CorrectNoReal + sum(flagSet{IdxSubject, IdxData}>=Bias); DataCorrectNoReal = DataCorrectNoReal + (mean(flagSet{IdxSubject, IdxData})>=Bias); TotalNoReal = TotalNoReal + size(flagSet{IdxSubject, IdxData}, 2); else CorrectNoFake = CorrectNoFake + sum(flagSet{IdxSubject, IdxData}= 1 imshow(data); frame_now = rgb2gray(imresize(data(box(1,2):box(1,2)+box(1,4), box(1,1):box(1,1)+box(1,3), :), [64,64])); rectangle('Position',box(1,:),'LineWidth',4,'EdgeColor','r'); TestFeature = [LBP_feature(frame_now, Map_u2_16, Map_u2_8), DoG(frame_now, 0.5, 1)']; TestFeature = (TestFeature-MinMax(1,:))./(MinMax(2,:)-MinMax(1,:)); [TestLabel, TestAccuracy, TestValue] = svmpredict(1, TestFeature, model, '-q'); flag = [flag(2:size(flag,2)), TestValue+bias]; disp(['frame:',num2str(i),'; time:',num2str(toc),'; flag:',num2str(TestValue+bias)]); text(20, 20, {['Frame: ',num2str(i)];['Time: ',num2str(toc),'s'];['Flag: ',num2str(TestValue+bias)];['TotalFlag: ',num2str(sum(flag))]}, 'Color', 'r', 'FontSize', 12, 'VerticalAlignment', 'top'); end if abs(sum(flag)) > threshold || i > max_frame; break; end end if sum(flag)>0 disp('real face'); text(box(1,1)+box(1,3)/2, box(1,2), 'Real Face', 'Color', 'r', 'FontSize', 30, 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom'); else disp('fake face'); text(box(1,1)+box(1,3)/2, box(1,2), 'Fake Face', 'Color', 'r', 'FontSize', 30, 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom'); end ================================================ FILE: Matlab/RealTime_OF.m ================================================ clear all, close all, clc %% camera adaptorname = 'winvideo'; info = imaqhwinfo(adaptorname); deviceID = info.DeviceIDs{1}; format = info.DeviceInfo(deviceID).SupportedFormats{5}; video = videoinput(adaptorname, deviceID, format); vidRes = get(video, 'VideoResolution'); nBands = get(video, 'NumberOfBands'); hImage = image( zeros(vidRes(2), vidRes(1), nBands) ); preview(video, hImage); %% SVM classifier addpath('./libsvm-3.19/matlab'); addpath('./HOOF'); load('OF_SVM_All.mat'); %% test opticalFlow = vision.OpticalFlow('ReferenceFrameSource', 'Input Port', 'OutputValue', 'Horizontal and vertical components in complex form', 'Method', 'Lucas-Kanade'); detector = vision.CascadeObjectDetector('MinSize', [64,64]); bins = 9; blocks = 10; bias = 0; threshold = 5; max_frame = 1000; i = 0; flag = zeros(1, 50); tic; while(1) i = i + 1; frame_now = rgb2gray(getsnapshot(video)); box = step(detector, frame_now); if size(box, 1) == 1 && i > 1 OF = step(opticalFlow, double(frame_now), double(frame_pre)); HOOF_Feature = HOOF(OF(box(2):box(2)+box(4), box(1):box(1)+box(3), :), bins, blocks); [TestLabel, TestAccuracy, TestValue] = svmpredict(1, HOOF_Feature, model, '-q'); flag = [flag(2:size(flag,2)), TestValue+bias]; disp(['frame:',num2str(i),'; time:',num2str(toc),'; flag:',num2str(TestValue+bias)]); rectangle('Position',box(1,:),'LineWidth',4,'EdgeColor','r'); text(20, 20, {['Frame: ',num2str(i)];['Time: ',num2str(toc),'s'];['Flag: ',num2str(TestValue+bias)];['TotalFlag: ',num2str(sum(flag))]}, 'Color', 'r', 'FontSize', 12, 'VerticalAlignment', 'top'); end frame_pre = frame_now; if abs(sum(flag)) > threshold || i > max_frame; break; end end if sum(flag)>0 disp('real face'); text(box(1,1)+box(1,3)/2, box(1,2), 'Real Face', 'Color', 'r', 'FontSize', 30, 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom'); else disp('fake face'); text(box(1,1)+box(1,3)/2, box(1,2), 'Fake Face', 'Color', 'r', 'FontSize', 30, 'HorizontalAlignment', 'center', 'VerticalAlignment', 'bottom'); end ================================================ FILE: Matlab/Save_CASIA_Test.m ================================================ clear all, close all, clc detector = vision.CascadeObjectDetector('MinSize', [100,100]); count_real = 0; count_fake = 0; for IdxSubject = 1 : 30 for IdxData = 1 : 8 if IdxData <= 8 Name = ['./CASIA/test_release/' num2str(IdxSubject) '/' num2str(IdxData) '.avi']; else Name = ['./CASIA/test_release/' num2str(IdxSubject) '/HR_' num2str(IdxData-8) '.avi']; end Mov = VideoReader(Name); for IdxFrame = 1 : Mov.NumberOfFrames data = read(Mov, IdxFrame); box = step(detector, data); if size(box, 1) == 1 frame_now = data(box(2):box(2)+box(4), box(1):box(1)+box(3), :); if IdxData <= 2 imwrite(frame_now, ['.\CASIA\test\real\' num2str(count_real, '%05d') '.png']); count_real = count_real + 1; else imwrite(frame_now, ['.\CASIA\test\fake\' num2str(count_fake, '%05d') '.png']); count_fake = count_fake + 1; end end end disp([num2str(IdxSubject) ', ' num2str(IdxData)]) clear Mov; end end ================================================ FILE: Matlab/Save_CASIA_Train.m ================================================ clear all, close all, clc detector = vision.CascadeObjectDetector('MinSize', [100,100]); count_real = 0; count_fake = 0; for IdxSubject = 1 : 20 for IdxData = 1 : 8 if IdxData <= 8 Name = ['./CASIA/train_release/' num2str(IdxSubject) '/' num2str(IdxData) '.avi']; else Name = ['./CASIA/train_release/' num2str(IdxSubject) '/HR_' num2str(IdxData-8) '.avi']; end Mov = VideoReader(Name); for IdxFrame = 1 : Mov.NumberOfFrames data = read(Mov, IdxFrame); box = step(detector, data); if size(box, 1) == 1 frame_now = data(box(2):box(2)+box(4), box(1):box(1)+box(3), :); if IdxData <= 2 imwrite(frame_now, ['.\CASIA\train\real\' num2str(count_real, '%05d') '.png']); count_real = count_real + 1; else imwrite(frame_now, ['.\CASIA\train\fake\' num2str(count_fake, '%05d') '.png']); count_fake = count_fake + 1; end end end disp([num2str(IdxSubject) ', ' num2str(IdxData)]) clear Mov; end end ================================================ FILE: Matlab/Save_NUAA.m ================================================ clear all, close all, clc ClientTrainNormalizedName = importdata('./NUAA/client_train_normalized.txt'); ClientTrainNormalizedNumber = size(ClientTrainNormalizedName, 1); ImposterTrainNormalizedName = importdata('./NUAA/imposter_train_normalized.txt'); ImposterTrainNormalizedNumber = size(ImposterTrainNormalizedName, 1); ClientTestNormalizedName = importdata('./NUAA/client_test_normalized.txt'); ClientTestNormalizedNumber = size(ClientTestNormalizedName, 1); ImposterTestNormalizedName = importdata('./NUAA/imposter_test_normalized.txt'); ImposterTestNormalizedNumber = size(ImposterTestNormalizedName, 1); for i = 1 : ClientTrainNormalizedNumber ClientTrain = imread(['./NUAA/ClientNormalized/' ClientTrainNormalizedName{i}]); imwrite(ClientTrain, ['.\NUAA\train\real\' num2str(i-1, '%05d') '.png']); end for i = 1 : ImposterTrainNormalizedNumber ImposterTrain = imread(['./NUAA/ImposterNormalized/' ImposterTrainNormalizedName{i}]); imwrite(ImposterTrain, ['.\NUAA\train\fake\' num2str(i-1, '%05d') '.png']); end for i = 1 : ClientTestNormalizedNumber ClientTest = imread(['./NUAA/ClientNormalized/' ClientTestNormalizedName{i}]); imwrite(ClientTest, ['.\NUAA\test\real\' num2str(i-1, '%05d') '.png']); end count_fake = 0; for i = 1 : ImposterTestNormalizedNumber ImposterTest = imread(['./NUAA/ImposterNormalized/' ImposterTestNormalizedName{i}]); imwrite(ImposterTest, ['.\NUAA\test\fake\' num2str(i-1, '%05d') '.png']); end ================================================ FILE: Matlab/Save_PRINT_ATTACK_Test.m ================================================ clear all, close all, clc detector = vision.CascadeObjectDetector('MinSize', [50,50]); fileIndex = {'009', '011', '013', '014', '019', '020', '021', '023', '024', '026', '028', '031', '102', '104', '106', '107', '109', '112', '115', '117'}; fileDirec = {'attack/fixed/attack_print_', 'attack/fixed/attack_print_', 'attack/hand/attack_print_', 'attack/hand/attack_print_', 'real/', 'real/', 'real/', 'real/'; ... 'highdef_photo_adverse', 'highdef_photo_controlled', 'highdef_photo_adverse', 'highdef_photo_controlled', 'webcam_authenticate_adverse_1', 'webcam_authenticate_adverse_2', 'webcam_authenticate_controlled_1', 'webcam_authenticate_controlled_2'}; fileNo = size(fileIndex, 2); count_real = 0; count_fake = 0; for IdxSubject = 1 : fileNo for IdxData = 1 : 8 Name = ['./PRINT-ATTACK/test/' fileDirec{1, IdxData} 'client' fileIndex{IdxSubject} '_session01_' fileDirec{2, IdxData} '.mov']; Mov = VideoReader(Name); NumFrame = Mov.NumberOfFrames; for IdxFrame = 1 : NumFrame data = read(Mov, IdxFrame); box = step(detector, data); if size(box, 1) == 1 frame_now = data(box(2):box(2)+box(4), box(1):box(1)+box(3), :); if IdxData > 4 imwrite(frame_now, ['.\PRINT-ATTACK\test_\real\' num2str(count_real, '%05d') '.png']); count_real = count_real + 1; else imwrite(frame_now, ['.\PRINT-ATTACK\test_\fake\' num2str(count_fake, '%05d') '.png']); count_fake = count_fake + 1; end end end disp([num2str(IdxSubject) ', ' num2str(IdxData)]) clear Mov; end end ================================================ FILE: Matlab/Save_PRINT_ATTACK_Train.m ================================================ clear all, close all, clc detector = vision.CascadeObjectDetector('MinSize', [50,50]); fileIndex = {'001', '002', '004', '006', '007', '008', '012', '016', '018', '025', '027', '103', '105', '108', '110'}; fileDirec = {'attack/fixed/attack_print_', 'attack/fixed/attack_print_', 'attack/hand/attack_print_', 'attack/hand/attack_print_', 'real/', 'real/', 'real/', 'real/'; ... 'highdef_photo_adverse', 'highdef_photo_controlled', 'highdef_photo_adverse', 'highdef_photo_controlled', 'webcam_authenticate_adverse_1', 'webcam_authenticate_adverse_2', 'webcam_authenticate_controlled_1', 'webcam_authenticate_controlled_2'}; fileNo = size(fileIndex, 2); count_real = 0; count_fake = 0; for IdxSubject = 1 : fileNo for IdxData = 1 : 8 Name = ['./PRINT-ATTACK/train/' fileDirec{1, IdxData} 'client' fileIndex{IdxSubject} '_session01_' fileDirec{2, IdxData} '.mov']; Mov = VideoReader(Name); NumFrame = Mov.NumberOfFrames; for IdxFrame = 1 : NumFrame data = read(Mov, IdxFrame); box = step(detector, data); if size(box, 1) == 1 frame_now = data(box(2):box(2)+box(4), box(1):box(1)+box(3), :); if IdxData > 4 imwrite(frame_now, ['.\PRINT-ATTACK\train_\real\' num2str(count_real, '%05d') '.png']); count_real = count_real + 1; else imwrite(frame_now, ['.\PRINT-ATTACK\train_\fake\' num2str(count_fake, '%05d') '.png']); count_fake = count_fake + 1; end end end disp([num2str(IdxSubject) ', ' num2str(IdxData)]) clear Mov; end end ================================================ FILE: Matlab/lbp-0.3.3/getmapping.m ================================================ %GETMAPPING returns a structure containing a mapping table for LBP codes. % MAPPING = GETMAPPING(SAMPLES,MAPPINGTYPE) returns a % structure containing a mapping table for % LBP codes in a neighbourhood of SAMPLES sampling % points. Possible values for MAPPINGTYPE are % 'u2' for uniform LBP % 'ri' for rotation-invariant LBP % 'riu2' for uniform rotation-invariant LBP. % % Example: % I=imread('rice.tif'); % MAPPING=getmapping(16,'riu2'); % LBPHIST=lbp(I,2,16,MAPPING,'hist'); % Now LBPHIST contains a rotation-invariant uniform LBP % histogram in a (16,2) neighbourhood. % function mapping = getmapping(samples,mappingtype) % Version 0.1.1 % Authors: Marko Heikkil and Timo Ahonen % Changelog % 0.1.1 Changed output to be a structure % Fixed a bug causing out of memory errors when generating rotation % invariant mappings with high number of sampling points. % Lauge Sorensen is acknowledged for spotting this problem. table = 0:2^samples-1; newMax = 0; %number of patterns in the resulting LBP code index = 0; if strcmp(mappingtype,'u2') %Uniform 2 newMax = samples*(samples-1) + 3; for i = 0:2^samples-1 j = bitset(bitshift(i,1,samples),1,bitget(i,samples)); %rotate left numt = sum(bitget(bitxor(i,j),1:samples)); %number of 1->0 and %0->1 transitions %in binary string %x is equal to the %number of 1-bits in %XOR(x,Rotate left(x)) if numt <= 2 table(i+1) = index; index = index + 1; else table(i+1) = newMax - 1; end end end if strcmp(mappingtype,'ri') %Rotation invariant tmpMap = zeros(2^samples,1) - 1; for i = 0:2^samples-1 rm = i; r = i; for j = 1:samples-1 r = bitset(bitshift(r,1,samples),1,bitget(r,samples)); %rotate %left if r < rm rm = r; end end if tmpMap(rm+1) < 0 tmpMap(rm+1) = newMax; newMax = newMax + 1; end table(i+1) = tmpMap(rm+1); end end if strcmp(mappingtype,'riu2') %Uniform & Rotation invariant newMax = samples + 2; for i = 0:2^samples - 1 j = bitset(bitshift(i,1,samples),1,bitget(i,samples)); %rotate left numt = sum(bitget(bitxor(i,j),1:samples)); if numt <= 2 table(i+1) = sum(bitget(i,1:samples)); else table(i+1) = samples+1; end end end mapping.table=table; mapping.samples=samples; mapping.num=newMax; ================================================ FILE: Matlab/lbp-0.3.3/lbp.m ================================================ %LBP returns the local binary pattern image or LBP histogram of an image. % J = LBP(I,R,N,MAPPING,MODE) returns either a local binary pattern % coded image or the local binary pattern histogram of an intensity % image I. The LBP codes are computed using N sampling points on a % circle of radius R and using mapping table defined by MAPPING. % See the getmapping function for different mappings and use 0 for % no mapping. Possible values for MODE are % 'h' or 'hist' to get a histogram of LBP codes % 'nh' to get a normalized histogram % Otherwise an LBP code image is returned. % % J = LBP(I) returns the original (basic) LBP histogram of image I % % J = LBP(I,SP,MAPPING,MODE) computes the LBP codes using n sampling % points defined in (n * 2) matrix SP. The sampling points should be % defined around the origin (coordinates (0,0)). % % Examples % -------- % I=imread('rice.png'); % mapping=getmapping(8,'u2'); % H1=LBP(I,1,8,mapping,'h'); %LBP histogram in (8,1) neighborhood % %using uniform patterns % subplot(2,1,1),stem(H1); % % H2=LBP(I); % subplot(2,1,2),stem(H2); % % SP=[-1 -1; -1 0; -1 1; 0 -1; -0 1; 1 -1; 1 0; 1 1]; % I2=LBP(I,SP,0,'i'); %LBP code image using sampling points in SP % %and no mapping. Now H2 is equal to histogram % %of I2. function result = lbp(varargin) % image,radius,neighbors,mapping,mode) % Version 0.3.3 % Authors: Marko Heikkil?and Timo Ahonen % Changelog % Version 0.3.2: A bug fix to enable using mappings together with a % predefined spoints array % Version 0.3.1: Changed MAPPING input to be a struct containing the mapping % table and the number of bins to make the function run faster with high number % of sampling points. Lauge Sorensen is acknowledged for spotting this problem. % Check number of input arguments. error(nargchk(1,5,nargin)); image=varargin{1}; d_image=double(image); if nargin==1 spoints=[-1 -1; -1 0; -1 1; 0 -1; -0 1; 1 -1; 1 0; 1 1]; neighbors=8; mapping=0; mode='h'; end if (nargin == 2) && (length(varargin{2}) == 1) error('Input arguments'); end if (nargin > 2) && (length(varargin{2}) == 1) radius=varargin{2}; neighbors=varargin{3}; spoints=zeros(neighbors,2); % Angle step. a = 2*pi/neighbors; for i = 1:neighbors spoints(i,1) = -radius*sin((i-1)*a); spoints(i,2) = radius*cos((i-1)*a); end if(nargin >= 4) mapping=varargin{4}; if(isstruct(mapping) && mapping.samples ~= neighbors) error('Incompatible mapping'); end else mapping=0; end if(nargin >= 5) mode=varargin{5}; else mode='h'; end end if (nargin > 1) && (length(varargin{2}) > 1) spoints=varargin{2}; neighbors=size(spoints,1); if(nargin >= 3) mapping=varargin{3}; if(isstruct(mapping) && mapping.samples ~= neighbors) error('Incompatible mapping'); end else mapping=0; end if(nargin >= 4) mode=varargin{4}; else mode='h'; end end % Determine the dimensions of the input image. [ysize xsize] = size(image); miny=min(spoints(:,1)); maxy=max(spoints(:,1)); minx=min(spoints(:,2)); maxx=max(spoints(:,2)); % Block size, each LBP code is computed within a block of size bsizey*bsizex bsizey=ceil(max(maxy,0))-floor(min(miny,0))+1; bsizex=ceil(max(maxx,0))-floor(min(minx,0))+1; % Coordinates of origin (0,0) in the block origy=1-floor(min(miny,0)); origx=1-floor(min(minx,0)); % Minimum allowed size for the input image depends % on the radius of the used LBP operator. if(xsize < bsizex || ysize < bsizey) error('Too small input image. Should be at least (2*radius+1) x (2*radius+1)'); end % Calculate dx and dy; dx = xsize - bsizex; dy = ysize - bsizey; % Fill the center pixel matrix C. C = image(origy:origy+dy,origx:origx+dx); d_C = double(C); bins = 2^neighbors; % Initialize the result matrix with zeros. result=zeros(dy+1,dx+1); %Compute the LBP code image for i = 1:neighbors y = spoints(i,1)+origy; x = spoints(i,2)+origx; % Calculate floors, ceils and rounds for the x and y. fy = floor(y); cy = ceil(y); ry = round(y); fx = floor(x); cx = ceil(x); rx = round(x); % Check if interpolation is needed. if (abs(x - rx) < 1e-6) && (abs(y - ry) < 1e-6) % Interpolation is not needed, use original datatypes N = image(ry:ry+dy,rx:rx+dx); D = N >= C; else % Interpolation needed, use double type images ty = y - fy; tx = x - fx; % Calculate the interpolation weights. w1 = roundn((1 - tx) * (1 - ty),-6); w2 = roundn(tx * (1 - ty),-6); w3 = roundn((1 - tx) * ty,-6) ; % w4 = roundn(tx * ty,-6) ; w4 = roundn(1 - w1 - w2 - w3, -6); % Compute interpolated pixel values N = w1*d_image(fy:fy+dy,fx:fx+dx) + w2*d_image(fy:fy+dy,cx:cx+dx) + ... w3*d_image(cy:cy+dy,fx:fx+dx) + w4*d_image(cy:cy+dy,cx:cx+dx); N = roundn(N,-4); D = N >= d_C; end % Update the result matrix. v = 2^(i-1); result = result + v*D; end %Apply mapping if it is defined if isstruct(mapping) bins = mapping.num; for i = 1:size(result,1) for j = 1:size(result,2) result(i,j) = mapping.table(result(i,j)+1); end end end if (strcmp(mode,'h') || strcmp(mode,'hist') || strcmp(mode,'nh')) % Return with LBP histogram if mode equals 'hist'. result=hist(result(:),0:(bins-1)); if (strcmp(mode,'nh')) result=result/sum(result); end else %Otherwise return a matrix of unsigned integers if ((bins-1)<=intmax('uint8')) result=uint8(result); elseif ((bins-1)<=intmax('uint16')) result=uint16(result); else result=uint32(result); end end end function x = roundn(x, n) error(nargchk(2, 2, nargin, 'struct')) validateattributes(x, {'single', 'double'}, {}, 'ROUNDN', 'X') validateattributes(n, ... {'numeric'}, {'scalar', 'real', 'integer'}, 'ROUNDN', 'N') if n < 0 p = 10 ^ -n; x = round(p * x) / p; elseif n > 0 p = 10 ^ n; x = p * round(x / p); else x = round(x); end end ================================================ FILE: Matlab/liblinear-1.96/COPYRIGHT ================================================ Copyright (c) 2007-2014 The LIBLINEAR Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither name of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: Matlab/liblinear-1.96/Makefile ================================================ CXX ?= g++ CC ?= gcc CFLAGS = -Wall -Wconversion -O3 -fPIC LIBS = blas/blas.a SHVER = 2 OS = $(shell uname) #LIBS = -lblas all: train predict lib: linear.o tron.o blas/blas.a if [ "$(OS)" = "Darwin" ]; then \ SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \ else \ SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \ fi; \ $(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER) train: tron.o linear.o train.c blas/blas.a $(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS) predict: tron.o linear.o predict.c blas/blas.a $(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS) tron.o: tron.cpp tron.h $(CXX) $(CFLAGS) -c -o tron.o tron.cpp linear.o: linear.cpp linear.h $(CXX) $(CFLAGS) -c -o linear.o linear.cpp blas/blas.a: blas/*.c blas/*.h make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)'; clean: make -C blas clean make -C matlab clean rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER) ================================================ FILE: Matlab/liblinear-1.96/Makefile.win ================================================ #You must ensure nmake.exe, cl.exe, link.exe are in system path. #VCVARS32.bat #Under dosbox prompt #nmake -f Makefile.win ########################################## CXX = cl.exe CFLAGS = /nologo /O2 /EHsc /I. /D _WIN32 /D _CRT_SECURE_NO_DEPRECATE TARGET = windows all: $(TARGET)\train.exe $(TARGET)\predict.exe $(TARGET)\train.exe: tron.obj linear.obj train.c blas\*.c $(CXX) $(CFLAGS) -Fe$(TARGET)\train.exe tron.obj linear.obj train.c blas\*.c $(TARGET)\predict.exe: tron.obj linear.obj predict.c blas\*.c $(CXX) $(CFLAGS) -Fe$(TARGET)\predict.exe tron.obj linear.obj predict.c blas\*.c linear.obj: linear.cpp linear.h $(CXX) $(CFLAGS) -c linear.cpp tron.obj: tron.cpp tron.h $(CXX) $(CFLAGS) -c tron.cpp lib: linear.cpp linear.h linear.def tron.obj $(CXX) $(CFLAGS) -LD linear.cpp tron.obj blas\*.c -Fe$(TARGET)\liblinear -link -DEF:linear.def clean: -erase /Q *.obj $(TARGET)\. ================================================ FILE: Matlab/liblinear-1.96/README ================================================ LIBLINEAR is a simple package for solving large-scale regularized linear classification and regression. It currently supports - L2-regularized logistic regression/L2-loss support vector classification/L1-loss support vector classification - L1-regularized L2-loss support vector classification/L1-regularized logistic regression - L2-regularized L2-loss support vector regression/L1-loss support vector regression. This document explains the usage of LIBLINEAR. To get started, please read the ``Quick Start'' section first. For developers, please check the ``Library Usage'' section to learn how to integrate LIBLINEAR in your software. Table of Contents ================= - When to use LIBLINEAR but not LIBSVM - Quick Start - Installation - `train' Usage - `predict' Usage - Examples - Library Usage - Building Windows Binaries - Additional Information - MATLAB/OCTAVE interface - PYTHON interface When to use LIBLINEAR but not LIBSVM ==================================== There are some large data for which with/without nonlinear mappings gives similar performances. Without using kernels, one can efficiently train a much larger set via linear classification/regression. These data usually have a large number of features. Document classification is an example. Warning: While generally liblinear is very fast, its default solver may be slow under certain situations (e.g., data not scaled or C is large). See Appendix B of our SVM guide about how to handle such cases. http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf Warning: If you are a beginner and your data sets are not large, you should consider LIBSVM first. LIBSVM page: http://www.csie.ntu.edu.tw/~cjlin/libsvm Quick Start =========== See the section ``Installation'' for installing LIBLINEAR. After installation, there are programs `train' and `predict' for training and testing, respectively. About the data format, please check the README file of LIBSVM. Note that feature index must start from 1 (but not 0). A sample classification data included in this package is `heart_scale'. Type `train heart_scale', and the program will read the training data and output the model file `heart_scale.model'. If you have a test set called heart_scale.t, then type `predict heart_scale.t heart_scale.model output' to see the prediction accuracy. The `output' file contains the predicted class labels. For more information about `train' and `predict', see the sections `train' Usage and `predict' Usage. To obtain good performances, sometimes one needs to scale the data. Please check the program `svm-scale' of LIBSVM. For large and sparse data, use `-l 0' to keep the sparsity. Installation ============ On Unix systems, type `make' to build the `train' and `predict' programs. Run them without arguments to show the usages. On other systems, consult `Makefile' to build them (e.g., see 'Building Windows binaries' in this file) or use the pre-built binaries (Windows binaries are in the directory `windows'). This software uses some level-1 BLAS subroutines. The needed functions are included in this package. If a BLAS library is available on your machine, you may use it by modifying the Makefile: Unmark the following line #LIBS ?= -lblas and mark LIBS ?= blas/blas.a `train' Usage ============= Usage: train [options] training_set_file [model_file] options: -s type : set type of solver (default 1) for multi-class classification 0 -- L2-regularized logistic regression (primal) 1 -- L2-regularized L2-loss support vector classification (dual) 2 -- L2-regularized L2-loss support vector classification (primal) 3 -- L2-regularized L1-loss support vector classification (dual) 4 -- support vector classification by Crammer and Singer 5 -- L1-regularized L2-loss support vector classification 6 -- L1-regularized logistic regression 7 -- L2-regularized logistic regression (dual) for regression 11 -- L2-regularized L2-loss support vector regression (primal) 12 -- L2-regularized L2-loss support vector regression (dual) 13 -- L2-regularized L1-loss support vector regression (dual) -c cost : set the parameter C (default 1) -p epsilon : set the epsilon in loss function of epsilon-SVR (default 0.1) -e epsilon : set tolerance of termination criterion -s 0 and 2 |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2, where f is the primal function and pos/neg are # of positive/negative data (default 0.01) -s 11 |f'(w)|_2 <= eps*|f'(w0)|_2 (default 0.001) -s 1, 3, 4 and 7 Dual maximal violation <= eps; similar to libsvm (default 0.1) -s 5 and 6 |f'(w)|_1 <= eps*min(pos,neg)/l*|f'(w0)|_1, where f is the primal function (default 0.01) -s 12 and 13\n" |f'(alpha)|_1 <= eps |f'(alpha0)|, where f is the dual function (default 0.1) -B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1) -wi weight: weights adjust the parameter C of different classes (see README for details) -v n: n-fold cross validation mode -q : quiet mode (no outputs) Option -v randomly splits the data into n parts and calculates cross validation accuracy on them. Formulations: For L2-regularized logistic regression (-s 0), we solve min_w w^Tw/2 + C \sum log(1 + exp(-y_i w^Tx_i)) For L2-regularized L2-loss SVC dual (-s 1), we solve min_alpha 0.5(alpha^T (Q + I/2/C) alpha) - e^T alpha s.t. 0 <= alpha_i, For L2-regularized L2-loss SVC (-s 2), we solve min_w w^Tw/2 + C \sum max(0, 1- y_i w^Tx_i)^2 For L2-regularized L1-loss SVC dual (-s 3), we solve min_alpha 0.5(alpha^T Q alpha) - e^T alpha s.t. 0 <= alpha_i <= C, For L1-regularized L2-loss SVC (-s 5), we solve min_w \sum |w_j| + C \sum max(0, 1- y_i w^Tx_i)^2 For L1-regularized logistic regression (-s 6), we solve min_w \sum |w_j| + C \sum log(1 + exp(-y_i w^Tx_i)) For L2-regularized logistic regression (-s 7), we solve min_alpha 0.5(alpha^T Q alpha) + \sum alpha_i*log(alpha_i) + \sum (C-alpha_i)*log(C-alpha_i) - a constant s.t. 0 <= alpha_i <= C, where Q is a matrix with Q_ij = y_i y_j x_i^T x_j. For L2-regularized L2-loss SVR (-s 11), we solve min_w w^Tw/2 + C \sum max(0, |y_i-w^Tx_i|-epsilon)^2 For L2-regularized L2-loss SVR dual (-s 12), we solve min_beta 0.5(beta^T (Q + lambda I/2/C) beta) - y^T beta + \sum |beta_i| For L2-regularized L1-loss SVR dual (-s 13), we solve min_beta 0.5(beta^T Q beta) - y^T beta + \sum |beta_i| s.t. -C <= beta_i <= C, where Q is a matrix with Q_ij = x_i^T x_j. If bias >= 0, w becomes [w; w_{n+1}] and x becomes [x; bias]. The primal-dual relationship implies that -s 1 and -s 2 give the same model, -s 0 and -s 7 give the same, and -s 11 and -s 12 give the same. We implement 1-vs-the rest multi-class strategy for classification. In training i vs. non_i, their C parameters are (weight from -wi)*C and C, respectively. If there are only two classes, we train only one model. Thus weight1*C vs. weight2*C is used. See examples below. We also implement multi-class SVM by Crammer and Singer (-s 4): min_{w_m, \xi_i} 0.5 \sum_m ||w_m||^2 + C \sum_i \xi_i s.t. w^T_{y_i} x_i - w^T_m x_i >= \e^m_i - \xi_i \forall m,i where e^m_i = 0 if y_i = m, e^m_i = 1 if y_i != m, Here we solve the dual problem: min_{\alpha} 0.5 \sum_m ||w_m(\alpha)||^2 + \sum_i \sum_m e^m_i alpha^m_i s.t. \alpha^m_i <= C^m_i \forall m,i , \sum_m \alpha^m_i=0 \forall i where w_m(\alpha) = \sum_i \alpha^m_i x_i, and C^m_i = C if m = y_i, C^m_i = 0 if m != y_i. `predict' Usage =============== Usage: predict [options] test_file model_file output_file options: -b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only -q : quiet mode (no outputs) Note that -b is only needed in the prediction phase. This is different from the setting of LIBSVM. Examples ======== > train data_file Train linear SVM with L2-loss function. > train -s 0 data_file Train a logistic regression model. > train -v 5 -e 0.001 data_file Do five-fold cross-validation using L2-loss svm. Use a smaller stopping tolerance 0.001 than the default 0.1 if you want more accurate solutions. > train -c 10 -w1 2 -w2 5 -w3 2 four_class_data_file Train four classifiers: positive negative Cp Cn class 1 class 2,3,4. 20 10 class 2 class 1,3,4. 50 10 class 3 class 1,2,4. 20 10 class 4 class 1,2,3. 10 10 > train -c 10 -w3 1 -w2 5 two_class_data_file If there are only two classes, we train ONE model. The C values for the two classes are 10 and 50. > predict -b 1 test_file data_file.model output_file Output probability estimates (for logistic regression only). Library Usage ============= - Function: model* train(const struct problem *prob, const struct parameter *param); This function constructs and returns a linear classification or regression model according to the given training data and parameters. struct problem describes the problem: struct problem { int l, n; int *y; struct feature_node **x; double bias; }; where `l' is the number of training data. If bias >= 0, we assume that one additional feature is added to the end of each data instance. `n' is the number of feature (including the bias feature if bias >= 0). `y' is an array containing the target values. (integers in classification, real numbers in regression) And `x' is an array of pointers, each of which points to a sparse representation (array of feature_node) of one training vector. For example, if we have the following training data: LABEL ATTR1 ATTR2 ATTR3 ATTR4 ATTR5 ----- ----- ----- ----- ----- ----- 1 0 0.1 0.2 0 0 2 0 0.1 0.3 -1.2 0 1 0.4 0 0 0 0 2 0 0.1 0 1.4 0.5 3 -0.1 -0.2 0.1 1.1 0.1 and bias = 1, then the components of problem are: l = 5 n = 6 y -> 1 2 1 2 3 x -> [ ] -> (2,0.1) (3,0.2) (6,1) (-1,?) [ ] -> (2,0.1) (3,0.3) (4,-1.2) (6,1) (-1,?) [ ] -> (1,0.4) (6,1) (-1,?) [ ] -> (2,0.1) (4,1.4) (5,0.5) (6,1) (-1,?) [ ] -> (1,-0.1) (2,-0.2) (3,0.1) (4,1.1) (5,0.1) (6,1) (-1,?) struct parameter describes the parameters of a linear classification or regression model: struct parameter { int solver_type; /* these are for training only */ double eps; /* stopping criteria */ double C; int nr_weight; int *weight_label; double* weight; double p; }; solver_type can be one of L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR, L2R_LR_DUAL, L2R_L2LOSS_SVR, L2R_L2LOSS_SVR_DUAL, L2R_L1LOSS_SVR_DUAL. for classification L2R_LR L2-regularized logistic regression (primal) L2R_L2LOSS_SVC_DUAL L2-regularized L2-loss support vector classification (dual) L2R_L2LOSS_SVC L2-regularized L2-loss support vector classification (primal) L2R_L1LOSS_SVC_DUAL L2-regularized L1-loss support vector classification (dual) MCSVM_CS support vector classification by Crammer and Singer L1R_L2LOSS_SVC L1-regularized L2-loss support vector classification L1R_LR L1-regularized logistic regression L2R_LR_DUAL L2-regularized logistic regression (dual) for regression L2R_L2LOSS_SVR L2-regularized L2-loss support vector regression (primal) L2R_L2LOSS_SVR_DUAL L2-regularized L2-loss support vector regression (dual) L2R_L1LOSS_SVR_DUAL L2-regularized L1-loss support vector regression (dual) C is the cost of constraints violation. p is the sensitiveness of loss of support vector regression. eps is the stopping criterion. nr_weight, weight_label, and weight are used to change the penalty for some classes (If the weight for a class is not changed, it is set to 1). This is useful for training classifier using unbalanced input data or with asymmetric misclassification cost. nr_weight is the number of elements in the array weight_label and weight. Each weight[i] corresponds to weight_label[i], meaning that the penalty of class weight_label[i] is scaled by a factor of weight[i]. If you do not want to change penalty for any of the classes, just set nr_weight to 0. *NOTE* To avoid wrong parameters, check_parameter() should be called before train(). struct model stores the model obtained from the training procedure: struct model { struct parameter param; int nr_class; /* number of classes */ int nr_feature; double *w; int *label; /* label of each class */ double bias; }; param describes the parameters used to obtain the model. nr_class and nr_feature are the number of classes and features, respectively. nr_class = 2 for regression. The nr_feature*nr_class array w gives feature weights. We use one against the rest for multi-class classification, so each feature index corresponds to nr_class weight values. Weights are organized in the following way +------------------+------------------+------------+ | nr_class weights | nr_class weights | ... | for 1st feature | for 2nd feature | +------------------+------------------+------------+ If bias >= 0, x becomes [x; bias]. The number of features is increased by one, so w is a (nr_feature+1)*nr_class array. The value of bias is stored in the variable bias. The array label stores class labels. - Function: void cross_validation(const problem *prob, const parameter *param, int nr_fold, double *target); This function conducts cross validation. Data are separated to nr_fold folds. Under given parameters, sequentially each fold is validated using the model from training the remaining. Predicted labels in the validation process are stored in the array called target. The format of prob is same as that for train(). - Function: double predict(const model *model_, const feature_node *x); For a classification model, the predicted class for x is returned. For a regression model, the function value of x calculated using the model is returned. - Function: double predict_values(const struct model *model_, const struct feature_node *x, double* dec_values); This function gives nr_w decision values in the array dec_values. nr_w=1 if regression is applied or the number of classes is two. An exception is multi-class svm by Crammer and Singer (-s 4), where nr_w = 2 if there are two classes. For all other situations, nr_w is the number of classes. We implement one-vs-the rest multi-class strategy (-s 0,1,2,3,5,6,7) and multi-class svm by Crammer and Singer (-s 4) for multi-class SVM. The class with the highest decision value is returned. - Function: double predict_probability(const struct model *model_, const struct feature_node *x, double* prob_estimates); This function gives nr_class probability estimates in the array prob_estimates. nr_class can be obtained from the function get_nr_class. The class with the highest probability is returned. Currently, we support only the probability outputs of logistic regression. - Function: int get_nr_feature(const model *model_); The function gives the number of attributes of the model. - Function: int get_nr_class(const model *model_); The function gives the number of classes of the model. For a regression model, 2 is returned. - Function: void get_labels(const model *model_, int* label); This function outputs the name of labels into an array called label. For a regression model, label is unchanged. - Function: double get_decfun_coef(const struct model *model_, int feat_idx, int label_idx); This function gives the coefficient for the feature with feature index = feat_idx and the class with label index = label_idx. Note that feat_idx starts from 1, while label_idx starts from 0. If feat_idx is not in the valid range (1 to nr_feature), then a zero value will be returned. For classification models, if label_idx is not in the valid range (0 to nr_class-1), then a zero value will be returned; for regression models, label_idx is ignored. - Function: double get_decfun_bias(const struct model *model_, int label_idx); This function gives the bias term corresponding to the class with the label_idx. For classification models, if label_idx is not in a valid range (0 to nr_class-1), then a zero value will be returned; for regression models, label_idx is ignored. - Function: const char *check_parameter(const struct problem *prob, const struct parameter *param); This function checks whether the parameters are within the feasible range of the problem. This function should be called before calling train() and cross_validation(). It returns NULL if the parameters are feasible, otherwise an error message is returned. - Function: int check_probability_model(const struct model *model); This function returns 1 if the model supports probability output; otherwise, it returns 0. - Function: int check_regression_model(const struct model *model); This function returns 1 if the model is a regression model; otherwise it returns 0. - Function: int save_model(const char *model_file_name, const struct model *model_); This function saves a model to a file; returns 0 on success, or -1 if an error occurs. - Function: struct model *load_model(const char *model_file_name); This function returns a pointer to the model read from the file, or a null pointer if the model could not be loaded. - Function: void free_model_content(struct model *model_ptr); This function frees the memory used by the entries in a model structure. - Function: void free_and_destroy_model(struct model **model_ptr_ptr); This function frees the memory used by a model and destroys the model structure. - Function: void destroy_param(struct parameter *param); This function frees the memory used by a parameter set. - Function: void set_print_string_function(void (*print_func)(const char *)); Users can specify their output format by a function. Use set_print_string_function(NULL); for default printing to stdout. Building Windows Binaries ========================= Windows binaries are in the directory `windows'. To build them via Visual C++, use the following steps: 1. Open a dos command box and change to liblinear directory. If environment variables of VC++ have not been set, type "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" You may have to modify the above command according which version of VC++ or where it is installed. 2. Type nmake -f Makefile.win clean all 2. (Optional) To build 64-bit windows binaries, you must (1) Setup vcvars64.bat instead of vcvars32.bat (2) Change CFLAGS in Makefile.win: /D _WIN32 to /D _WIN64 MATLAB/OCTAVE Interface ======================= Please check the file README in the directory `matlab'. PYTHON Interface ================ Please check the file README in the directory `python'. Additional Information ====================== If you find LIBLINEAR helpful, please cite it as R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A Library for Large Linear Classification, Journal of Machine Learning Research 9(2008), 1871-1874. Software available at http://www.csie.ntu.edu.tw/~cjlin/liblinear For any questions and comments, please send your email to cjlin@csie.ntu.edu.tw ================================================ FILE: Matlab/liblinear-1.96/blas/Makefile ================================================ AR = ar rcv RANLIB = ranlib HEADERS = blas.h blasp.h FILES = dnrm2.o daxpy.o ddot.o dscal.o CFLAGS = $(OPTFLAGS) FFLAGS = $(OPTFLAGS) blas: $(FILES) $(HEADERS) $(AR) blas.a $(FILES) $(RANLIB) blas.a clean: - rm -f *.o - rm -f *.a - rm -f *~ .c.o: $(CC) $(CFLAGS) -c $*.c ================================================ FILE: Matlab/liblinear-1.96/blas/blas.h ================================================ /* blas.h -- C header file for BLAS Ver 1.0 */ /* Jesse Bennett March 23, 2000 */ /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ #ifndef BLAS_INCLUDE #define BLAS_INCLUDE /* Data types specific to BLAS implementation */ typedef struct { float r, i; } fcomplex; typedef struct { double r, i; } dcomplex; typedef int blasbool; #include "blasp.h" /* Prototypes for all BLAS functions */ #define FALSE 0 #define TRUE 1 /* Macro functions */ #define MIN(a,b) ((a) <= (b) ? (a) : (b)) #define MAX(a,b) ((a) >= (b) ? (a) : (b)) #endif ================================================ FILE: Matlab/liblinear-1.96/blas/blasp.h ================================================ /* blasp.h -- C prototypes for BLAS Ver 1.0 */ /* Jesse Bennett March 23, 2000 */ /* Functions listed in alphabetical order */ #ifdef __cplusplus extern "C" { #endif #ifdef F2C_COMPAT void cdotc_(fcomplex *dotval, int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); void cdotu_(fcomplex *dotval, int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); double sasum_(int *n, float *sx, int *incx); double scasum_(int *n, fcomplex *cx, int *incx); double scnrm2_(int *n, fcomplex *x, int *incx); double sdot_(int *n, float *sx, int *incx, float *sy, int *incy); double snrm2_(int *n, float *x, int *incx); void zdotc_(dcomplex *dotval, int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); void zdotu_(dcomplex *dotval, int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); #else fcomplex cdotc_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); fcomplex cdotu_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); float sasum_(int *n, float *sx, int *incx); float scasum_(int *n, fcomplex *cx, int *incx); float scnrm2_(int *n, fcomplex *x, int *incx); float sdot_(int *n, float *sx, int *incx, float *sy, int *incy); float snrm2_(int *n, float *x, int *incx); dcomplex zdotc_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); dcomplex zdotu_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); #endif /* Remaining functions listed in alphabetical order */ int caxpy_(int *n, fcomplex *ca, fcomplex *cx, int *incx, fcomplex *cy, int *incy); int ccopy_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); int cgbmv_(char *trans, int *m, int *n, int *kl, int *ku, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy); int cgemm_(char *transa, char *transb, int *m, int *n, int *k, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta, fcomplex *c, int *ldc); int cgemv_(char *trans, int *m, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy); int cgerc_(int *m, int *n, fcomplex *alpha, fcomplex *x, int *incx, fcomplex *y, int *incy, fcomplex *a, int *lda); int cgeru_(int *m, int *n, fcomplex *alpha, fcomplex *x, int *incx, fcomplex *y, int *incy, fcomplex *a, int *lda); int chbmv_(char *uplo, int *n, int *k, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy); int chemm_(char *side, char *uplo, int *m, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta, fcomplex *c, int *ldc); int chemv_(char *uplo, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy); int cher_(char *uplo, int *n, float *alpha, fcomplex *x, int *incx, fcomplex *a, int *lda); int cher2_(char *uplo, int *n, fcomplex *alpha, fcomplex *x, int *incx, fcomplex *y, int *incy, fcomplex *a, int *lda); int cher2k_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb, float *beta, fcomplex *c, int *ldc); int cherk_(char *uplo, char *trans, int *n, int *k, float *alpha, fcomplex *a, int *lda, float *beta, fcomplex *c, int *ldc); int chpmv_(char *uplo, int *n, fcomplex *alpha, fcomplex *ap, fcomplex *x, int *incx, fcomplex *beta, fcomplex *y, int *incy); int chpr_(char *uplo, int *n, float *alpha, fcomplex *x, int *incx, fcomplex *ap); int chpr2_(char *uplo, int *n, fcomplex *alpha, fcomplex *x, int *incx, fcomplex *y, int *incy, fcomplex *ap); int crotg_(fcomplex *ca, fcomplex *cb, float *c, fcomplex *s); int cscal_(int *n, fcomplex *ca, fcomplex *cx, int *incx); int csscal_(int *n, float *sa, fcomplex *cx, int *incx); int cswap_(int *n, fcomplex *cx, int *incx, fcomplex *cy, int *incy); int csymm_(char *side, char *uplo, int *m, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta, fcomplex *c, int *ldc); int csyr2k_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb, fcomplex *beta, fcomplex *c, int *ldc); int csyrk_(char *uplo, char *trans, int *n, int *k, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *beta, fcomplex *c, int *ldc); int ctbmv_(char *uplo, char *trans, char *diag, int *n, int *k, fcomplex *a, int *lda, fcomplex *x, int *incx); int ctbsv_(char *uplo, char *trans, char *diag, int *n, int *k, fcomplex *a, int *lda, fcomplex *x, int *incx); int ctpmv_(char *uplo, char *trans, char *diag, int *n, fcomplex *ap, fcomplex *x, int *incx); int ctpsv_(char *uplo, char *trans, char *diag, int *n, fcomplex *ap, fcomplex *x, int *incx); int ctrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb); int ctrmv_(char *uplo, char *trans, char *diag, int *n, fcomplex *a, int *lda, fcomplex *x, int *incx); int ctrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, fcomplex *alpha, fcomplex *a, int *lda, fcomplex *b, int *ldb); int ctrsv_(char *uplo, char *trans, char *diag, int *n, fcomplex *a, int *lda, fcomplex *x, int *incx); int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy, int *incy); int dcopy_(int *n, double *sx, int *incx, double *sy, int *incy); int dgbmv_(char *trans, int *m, int *n, int *kl, int *ku, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); int dgemm_(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); int dgemv_(char *trans, int *m, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); int dger_(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda); int drot_(int *n, double *sx, int *incx, double *sy, int *incy, double *c, double *s); int drotg_(double *sa, double *sb, double *c, double *s); int dsbmv_(char *uplo, int *n, int *k, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); int dscal_(int *n, double *sa, double *sx, int *incx); int dspmv_(char *uplo, int *n, double *alpha, double *ap, double *x, int *incx, double *beta, double *y, int *incy); int dspr_(char *uplo, int *n, double *alpha, double *x, int *incx, double *ap); int dspr2_(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *ap); int dswap_(int *n, double *sx, int *incx, double *sy, int *incy); int dsymm_(char *side, char *uplo, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); int dsymv_(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy); int dsyr_(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda); int dsyr2_(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda); int dsyr2k_(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc); int dsyrk_(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c, int *ldc); int dtbmv_(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx); int dtbsv_(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx); int dtpmv_(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx); int dtpsv_(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx); int dtrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb); int dtrmv_(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx); int dtrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb); int dtrsv_(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx); int saxpy_(int *n, float *sa, float *sx, int *incx, float *sy, int *incy); int scopy_(int *n, float *sx, int *incx, float *sy, int *incy); int sgbmv_(char *trans, int *m, int *n, int *kl, int *ku, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); int sgemm_(char *transa, char *transb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); int sgemv_(char *trans, int *m, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); int sger_(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda); int srot_(int *n, float *sx, int *incx, float *sy, int *incy, float *c, float *s); int srotg_(float *sa, float *sb, float *c, float *s); int ssbmv_(char *uplo, int *n, int *k, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); int sscal_(int *n, float *sa, float *sx, int *incx); int sspmv_(char *uplo, int *n, float *alpha, float *ap, float *x, int *incx, float *beta, float *y, int *incy); int sspr_(char *uplo, int *n, float *alpha, float *x, int *incx, float *ap); int sspr2_(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *ap); int sswap_(int *n, float *sx, int *incx, float *sy, int *incy); int ssymm_(char *side, char *uplo, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); int ssymv_(char *uplo, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy); int ssyr_(char *uplo, int *n, float *alpha, float *x, int *incx, float *a, int *lda); int ssyr2_(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda); int ssyr2k_(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc); int ssyrk_(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c, int *ldc); int stbmv_(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx); int stbsv_(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx); int stpmv_(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx); int stpsv_(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx); int strmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb); int strmv_(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx); int strsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb); int strsv_(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx); int zaxpy_(int *n, dcomplex *ca, dcomplex *cx, int *incx, dcomplex *cy, int *incy); int zcopy_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); int zdscal_(int *n, double *sa, dcomplex *cx, int *incx); int zgbmv_(char *trans, int *m, int *n, int *kl, int *ku, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy); int zgemm_(char *transa, char *transb, int *m, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc); int zgemv_(char *trans, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy); int zgerc_(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda); int zgeru_(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda); int zhbmv_(char *uplo, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy); int zhemm_(char *side, char *uplo, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc); int zhemv_(char *uplo, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy); int zher_(char *uplo, int *n, double *alpha, dcomplex *x, int *incx, dcomplex *a, int *lda); int zher2_(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda); int zher2k_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, double *beta, dcomplex *c, int *ldc); int zherk_(char *uplo, char *trans, int *n, int *k, double *alpha, dcomplex *a, int *lda, double *beta, dcomplex *c, int *ldc); int zhpmv_(char *uplo, int *n, dcomplex *alpha, dcomplex *ap, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy); int zhpr_(char *uplo, int *n, double *alpha, dcomplex *x, int *incx, dcomplex *ap); int zhpr2_(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *ap); int zrotg_(dcomplex *ca, dcomplex *cb, double *c, dcomplex *s); int zscal_(int *n, dcomplex *ca, dcomplex *cx, int *incx); int zswap_(int *n, dcomplex *cx, int *incx, dcomplex *cy, int *incy); int zsymm_(char *side, char *uplo, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc); int zsyr2k_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc); int zsyrk_(char *uplo, char *trans, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *beta, dcomplex *c, int *ldc); int ztbmv_(char *uplo, char *trans, char *diag, int *n, int *k, dcomplex *a, int *lda, dcomplex *x, int *incx); int ztbsv_(char *uplo, char *trans, char *diag, int *n, int *k, dcomplex *a, int *lda, dcomplex *x, int *incx); int ztpmv_(char *uplo, char *trans, char *diag, int *n, dcomplex *ap, dcomplex *x, int *incx); int ztpsv_(char *uplo, char *trans, char *diag, int *n, dcomplex *ap, dcomplex *x, int *incx); int ztrmm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb); int ztrmv_(char *uplo, char *trans, char *diag, int *n, dcomplex *a, int *lda, dcomplex *x, int *incx); int ztrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb); int ztrsv_(char *uplo, char *trans, char *diag, int *n, dcomplex *a, int *lda, dcomplex *x, int *incx); #ifdef __cplusplus } #endif ================================================ FILE: Matlab/liblinear-1.96/blas/daxpy.c ================================================ #include "blas.h" #ifdef __cplusplus extern "C" { #endif int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy, int *incy) { long int i, m, ix, iy, nn, iincx, iincy; register double ssa; /* constant times a vector plus a vector. uses unrolled loop for increments equal to one. jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*) */ /* Dereference inputs */ nn = *n; ssa = *sa; iincx = *incx; iincy = *incy; if( nn > 0 && ssa != 0.0 ) { if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */ { m = nn-3; for (i = 0; i < m; i += 4) { sy[i] += ssa * sx[i]; sy[i+1] += ssa * sx[i+1]; sy[i+2] += ssa * sx[i+2]; sy[i+3] += ssa * sx[i+3]; } for ( ; i < nn; ++i) /* clean-up loop */ sy[i] += ssa * sx[i]; } else /* code for unequal increments or equal increments not equal to 1 */ { ix = iincx >= 0 ? 0 : (1 - nn) * iincx; iy = iincy >= 0 ? 0 : (1 - nn) * iincy; for (i = 0; i < nn; i++) { sy[iy] += ssa * sx[ix]; ix += iincx; iy += iincy; } } } return 0; } /* daxpy_ */ #ifdef __cplusplus } #endif ================================================ FILE: Matlab/liblinear-1.96/blas/ddot.c ================================================ #include "blas.h" #ifdef __cplusplus extern "C" { #endif double ddot_(int *n, double *sx, int *incx, double *sy, int *incy) { long int i, m, nn, iincx, iincy; double stemp; long int ix, iy; /* forms the dot product of two vectors. uses unrolled loops for increments equal to one. jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array(*) */ /* Dereference inputs */ nn = *n; iincx = *incx; iincy = *incy; stemp = 0.0; if (nn > 0) { if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */ { m = nn-4; for (i = 0; i < m; i += 5) stemp += sx[i] * sy[i] + sx[i+1] * sy[i+1] + sx[i+2] * sy[i+2] + sx[i+3] * sy[i+3] + sx[i+4] * sy[i+4]; for ( ; i < nn; i++) /* clean-up loop */ stemp += sx[i] * sy[i]; } else /* code for unequal increments or equal increments not equal to 1 */ { ix = 0; iy = 0; if (iincx < 0) ix = (1 - nn) * iincx; if (iincy < 0) iy = (1 - nn) * iincy; for (i = 0; i < nn; i++) { stemp += sx[ix] * sy[iy]; ix += iincx; iy += iincy; } } } return stemp; } /* ddot_ */ #ifdef __cplusplus } #endif ================================================ FILE: Matlab/liblinear-1.96/blas/dnrm2.c ================================================ #include /* Needed for fabs() and sqrt() */ #include "blas.h" #ifdef __cplusplus extern "C" { #endif double dnrm2_(int *n, double *x, int *incx) { long int ix, nn, iincx; double norm, scale, absxi, ssq, temp; /* DNRM2 returns the euclidean norm of a vector via the function name, so that DNRM2 := sqrt( x'*x ) -- This version written on 25-October-1982. Modified on 14-October-1993 to inline the call to SLASSQ. Sven Hammarling, Nag Ltd. */ /* Dereference inputs */ nn = *n; iincx = *incx; if( nn > 0 && iincx > 0 ) { if (nn == 1) { norm = fabs(x[0]); } else { scale = 0.0; ssq = 1.0; /* The following loop is equivalent to this call to the LAPACK auxiliary routine: CALL SLASSQ( N, X, INCX, SCALE, SSQ ) */ for (ix=(nn-1)*iincx; ix>=0; ix-=iincx) { if (x[ix] != 0.0) { absxi = fabs(x[ix]); if (scale < absxi) { temp = scale / absxi; ssq = ssq * (temp * temp) + 1.0; scale = absxi; } else { temp = absxi / scale; ssq += temp * temp; } } } norm = scale * sqrt(ssq); } } else norm = 0.0; return norm; } /* dnrm2_ */ #ifdef __cplusplus } #endif ================================================ FILE: Matlab/liblinear-1.96/blas/dscal.c ================================================ #include "blas.h" #ifdef __cplusplus extern "C" { #endif int dscal_(int *n, double *sa, double *sx, int *incx) { long int i, m, nincx, nn, iincx; double ssa; /* scales a vector by a constant. uses unrolled loops for increment equal to 1. jack dongarra, linpack, 3/11/78. modified 3/93 to return if incx .le. 0. modified 12/3/93, array(1) declarations changed to array(*) */ /* Dereference inputs */ nn = *n; iincx = *incx; ssa = *sa; if (nn > 0 && iincx > 0) { if (iincx == 1) /* code for increment equal to 1 */ { m = nn-4; for (i = 0; i < m; i += 5) { sx[i] = ssa * sx[i]; sx[i+1] = ssa * sx[i+1]; sx[i+2] = ssa * sx[i+2]; sx[i+3] = ssa * sx[i+3]; sx[i+4] = ssa * sx[i+4]; } for ( ; i < nn; ++i) /* clean-up loop */ sx[i] = ssa * sx[i]; } else /* code for increment not equal to 1 */ { nincx = nn * iincx; for (i = 0; i < nincx; i += iincx) sx[i] = ssa * sx[i]; } } return 0; } /* dscal_ */ #ifdef __cplusplus } #endif ================================================ FILE: Matlab/liblinear-1.96/heart_scale ================================================ +1 1:0.708333 2:1 3:1 4:-0.320755 5:-0.105023 6:-1 7:1 8:-0.419847 9:-1 10:-0.225806 12:1 13:-1 -1 1:0.583333 2:-1 3:0.333333 4:-0.603774 5:1 6:-1 7:1 8:0.358779 9:-1 10:-0.483871 12:-1 13:1 +1 1:0.166667 2:1 3:-0.333333 4:-0.433962 5:-0.383562 6:-1 7:-1 8:0.0687023 9:-1 10:-0.903226 11:-1 12:-1 13:1 -1 1:0.458333 2:1 3:1 4:-0.358491 5:-0.374429 6:-1 7:-1 8:-0.480916 9:1 10:-0.935484 12:-0.333333 13:1 -1 1:0.875 2:-1 3:-0.333333 4:-0.509434 5:-0.347032 6:-1 7:1 8:-0.236641 9:1 10:-0.935484 11:-1 12:-0.333333 13:-1 -1 1:0.5 2:1 3:1 4:-0.509434 5:-0.767123 6:-1 7:-1 8:0.0534351 9:-1 10:-0.870968 11:-1 12:-1 13:1 +1 1:0.125 2:1 3:0.333333 4:-0.320755 5:-0.406393 6:1 7:1 8:0.0839695 9:1 10:-0.806452 12:-0.333333 13:0.5 +1 1:0.25 2:1 3:1 4:-0.698113 5:-0.484018 6:-1 7:1 8:0.0839695 9:1 10:-0.612903 12:-0.333333 13:1 +1 1:0.291667 2:1 3:1 4:-0.132075 5:-0.237443 6:-1 7:1 8:0.51145 9:-1 10:-0.612903 12:0.333333 13:1 +1 1:0.416667 2:-1 3:1 4:0.0566038 5:0.283105 6:-1 7:1 8:0.267176 9:-1 10:0.290323 12:1 13:1 -1 1:0.25 2:1 3:1 4:-0.226415 5:-0.506849 6:-1 7:-1 8:0.374046 9:-1 10:-0.83871 12:-1 13:1 -1 2:1 3:1 4:-0.0943396 5:-0.543379 6:-1 7:1 8:-0.389313 9:1 10:-1 11:-1 12:-1 13:1 -1 1:-0.375 2:1 3:0.333333 4:-0.132075 5:-0.502283 6:-1 7:1 8:0.664122 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.333333 2:1 3:-1 4:-0.245283 5:-0.506849 6:-1 7:-1 8:0.129771 9:-1 10:-0.16129 12:0.333333 13:-1 -1 1:0.166667 2:-1 3:1 4:-0.358491 5:-0.191781 6:-1 7:1 8:0.343511 9:-1 10:-1 11:-1 12:-0.333333 13:-1 -1 1:0.75 2:-1 3:1 4:-0.660377 5:-0.894977 6:-1 7:-1 8:-0.175573 9:-1 10:-0.483871 12:-1 13:-1 +1 1:-0.291667 2:1 3:1 4:-0.132075 5:-0.155251 6:-1 7:-1 8:-0.251908 9:1 10:-0.419355 12:0.333333 13:1 +1 2:1 3:1 4:-0.132075 5:-0.648402 6:1 7:1 8:0.282443 9:1 11:1 12:-1 13:1 -1 1:0.458333 2:1 3:-1 4:-0.698113 5:-0.611872 6:-1 7:1 8:0.114504 9:1 10:-0.419355 12:-1 13:-1 -1 1:-0.541667 2:1 3:-1 4:-0.132075 5:-0.666667 6:-1 7:-1 8:0.633588 9:1 10:-0.548387 11:-1 12:-1 13:1 +1 1:0.583333 2:1 3:1 4:-0.509434 5:-0.52968 6:-1 7:1 8:-0.114504 9:1 10:-0.16129 12:0.333333 13:1 -1 1:-0.208333 2:1 3:-0.333333 4:-0.320755 5:-0.456621 6:-1 7:1 8:0.664122 9:-1 10:-0.935484 12:-1 13:-1 -1 1:-0.416667 2:1 3:1 4:-0.603774 5:-0.191781 6:-1 7:-1 8:0.679389 9:-1 10:-0.612903 12:-1 13:-1 -1 1:-0.25 2:1 3:1 4:-0.660377 5:-0.643836 6:-1 7:-1 8:0.0992366 9:-1 10:-0.967742 11:-1 12:-1 13:-1 -1 1:0.0416667 2:-1 3:-0.333333 4:-0.283019 5:-0.260274 6:1 7:1 8:0.343511 9:1 10:-1 11:-1 12:-0.333333 13:-1 -1 1:-0.208333 2:-1 3:0.333333 4:-0.320755 5:-0.319635 6:-1 7:-1 8:0.0381679 9:-1 10:-0.935484 11:-1 12:-1 13:-1 -1 1:-0.291667 2:-1 3:1 4:-0.169811 5:-0.465753 6:-1 7:1 8:0.236641 9:1 10:-1 12:-1 13:-1 -1 1:-0.0833333 2:-1 3:0.333333 4:-0.509434 5:-0.228311 6:-1 7:1 8:0.312977 9:-1 10:-0.806452 11:-1 12:-1 13:-1 +1 1:0.208333 2:1 3:0.333333 4:-0.660377 5:-0.525114 6:-1 7:1 8:0.435115 9:-1 10:-0.193548 12:-0.333333 13:1 -1 1:0.75 2:-1 3:0.333333 4:-0.698113 5:-0.365297 6:1 7:1 8:-0.0992366 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:0.166667 2:1 3:0.333333 4:-0.358491 5:-0.52968 6:-1 7:1 8:0.206107 9:-1 10:-0.870968 12:-0.333333 13:1 -1 1:0.541667 2:1 3:1 4:0.245283 5:-0.534247 6:-1 7:1 8:0.0229008 9:-1 10:-0.258065 11:-1 12:-1 13:0.5 -1 1:-0.666667 2:-1 3:0.333333 4:-0.509434 5:-0.593607 6:-1 7:-1 8:0.51145 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.25 2:1 3:1 4:0.433962 5:-0.086758 6:-1 7:1 8:0.0534351 9:1 10:0.0967742 11:1 12:-1 13:1 +1 1:-0.125 2:1 3:1 4:-0.0566038 5:-0.6621 6:-1 7:1 8:-0.160305 9:1 10:-0.709677 12:-1 13:1 +1 1:-0.208333 2:1 3:1 4:-0.320755 5:-0.406393 6:1 7:1 8:0.206107 9:1 10:-1 11:-1 12:0.333333 13:1 +1 1:0.333333 2:1 3:1 4:-0.132075 5:-0.630137 6:-1 7:1 8:0.0229008 9:1 10:-0.387097 11:-1 12:-0.333333 13:1 +1 1:0.25 2:1 3:-1 4:0.245283 5:-0.328767 6:-1 7:1 8:-0.175573 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.458333 2:1 3:0.333333 4:-0.320755 5:-0.753425 6:-1 7:-1 8:0.206107 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.208333 2:1 3:1 4:-0.471698 5:-0.561644 6:-1 7:1 8:0.755725 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.541667 2:1 3:1 4:0.0943396 5:-0.557078 6:-1 7:-1 8:0.679389 9:-1 10:-1 11:-1 12:-1 13:1 -1 1:0.375 2:-1 3:1 4:-0.433962 5:-0.621005 6:-1 7:-1 8:0.40458 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.375 2:1 3:0.333333 4:-0.320755 5:-0.511416 6:-1 7:-1 8:0.648855 9:1 10:-0.870968 11:-1 12:-1 13:-1 -1 1:-0.291667 2:1 3:-0.333333 4:-0.867925 5:-0.675799 6:1 7:-1 8:0.29771 9:-1 10:-1 11:-1 12:-1 13:1 +1 1:0.25 2:1 3:0.333333 4:-0.396226 5:-0.579909 6:1 7:-1 8:-0.0381679 9:-1 10:-0.290323 12:-0.333333 13:0.5 -1 1:0.208333 2:1 3:0.333333 4:-0.132075 5:-0.611872 6:1 7:1 8:0.435115 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.166667 2:1 3:0.333333 4:-0.54717 5:-0.894977 6:-1 7:1 8:-0.160305 9:-1 10:-0.741935 11:-1 12:1 13:-1 +1 1:-0.375 2:1 3:1 4:-0.698113 5:-0.675799 6:-1 7:1 8:0.618321 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:0.541667 2:1 3:-0.333333 4:0.245283 5:-0.452055 6:-1 7:-1 8:-0.251908 9:1 10:-1 12:1 13:0.5 +1 1:0.5 2:-1 3:1 4:0.0566038 5:-0.547945 6:-1 7:1 8:-0.343511 9:-1 10:-0.677419 12:1 13:1 +1 1:-0.458333 2:1 3:1 4:-0.207547 5:-0.136986 6:-1 7:-1 8:-0.175573 9:1 10:-0.419355 12:-1 13:0.5 -1 1:-0.0416667 2:1 3:-0.333333 4:-0.358491 5:-0.639269 6:1 7:-1 8:0.725191 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.5 2:-1 3:0.333333 4:-0.132075 5:0.328767 6:1 7:1 8:0.312977 9:-1 10:-0.741935 11:-1 12:-0.333333 13:-1 -1 1:0.416667 2:-1 3:-0.333333 4:-0.132075 5:-0.684932 6:-1 7:-1 8:0.648855 9:-1 10:-1 11:-1 12:0.333333 13:-1 -1 1:-0.333333 2:-1 3:-0.333333 4:-0.320755 5:-0.506849 6:-1 7:1 8:0.587786 9:-1 10:-0.806452 12:-1 13:-1 -1 1:-0.5 2:-1 3:-0.333333 4:-0.792453 5:-0.671233 6:-1 7:-1 8:0.480916 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:0.333333 2:1 3:1 4:-0.169811 5:-0.817352 6:-1 7:1 8:-0.175573 9:1 10:0.16129 12:-0.333333 13:-1 -1 1:0.291667 2:-1 3:0.333333 4:-0.509434 5:-0.762557 6:1 7:-1 8:-0.618321 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.25 2:-1 3:1 4:0.509434 5:-0.438356 6:-1 7:-1 8:0.0992366 9:1 10:-1 12:-1 13:-1 +1 1:0.375 2:1 3:-0.333333 4:-0.509434 5:-0.292237 6:-1 7:1 8:-0.51145 9:-1 10:-0.548387 12:-0.333333 13:1 -1 1:0.166667 2:1 3:0.333333 4:0.0566038 5:-1 6:1 7:-1 8:0.557252 9:-1 10:-0.935484 11:-1 12:-0.333333 13:1 +1 1:-0.0833333 2:-1 3:1 4:-0.320755 5:-0.182648 6:-1 7:-1 8:0.0839695 9:1 10:-0.612903 12:-1 13:1 -1 1:-0.375 2:1 3:0.333333 4:-0.509434 5:-0.543379 6:-1 7:-1 8:0.496183 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.291667 2:-1 3:-1 4:0.0566038 5:-0.479452 6:-1 7:-1 8:0.526718 9:-1 10:-0.709677 11:-1 12:-1 13:-1 -1 1:0.416667 2:1 3:-1 4:-0.0377358 5:-0.511416 6:1 7:1 8:0.206107 9:-1 10:-0.258065 11:1 12:-1 13:0.5 +1 1:0.166667 2:1 3:1 4:0.0566038 5:-0.315068 6:-1 7:1 8:-0.374046 9:1 10:-0.806452 12:-0.333333 13:0.5 -1 1:-0.0833333 2:1 3:1 4:-0.132075 5:-0.383562 6:-1 7:1 8:0.755725 9:1 10:-1 11:-1 12:-1 13:-1 +1 1:0.208333 2:-1 3:-0.333333 4:-0.207547 5:-0.118721 6:1 7:1 8:0.236641 9:-1 10:-1 11:-1 12:0.333333 13:-1 -1 1:-0.375 2:-1 3:0.333333 4:-0.54717 5:-0.47032 6:-1 7:-1 8:0.19084 9:-1 10:-0.903226 12:-0.333333 13:-1 +1 1:-0.25 2:1 3:0.333333 4:-0.735849 5:-0.465753 6:-1 7:-1 8:0.236641 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.333333 2:1 3:1 4:-0.509434 5:-0.388128 6:-1 7:-1 8:0.0534351 9:1 10:0.16129 12:-0.333333 13:1 -1 1:0.166667 2:-1 3:1 4:-0.509434 5:0.0410959 6:-1 7:-1 8:0.40458 9:1 10:-0.806452 11:-1 12:-1 13:-1 -1 1:0.708333 2:1 3:-0.333333 4:0.169811 5:-0.456621 6:-1 7:1 8:0.0992366 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.958333 2:-1 3:0.333333 4:-0.132075 5:-0.675799 6:-1 8:-0.312977 9:-1 10:-0.645161 12:-1 13:-1 -1 1:0.583333 2:-1 3:1 4:-0.773585 5:-0.557078 6:-1 7:-1 8:0.0839695 9:-1 10:-0.903226 11:-1 12:0.333333 13:-1 +1 1:-0.333333 2:1 3:1 4:-0.0943396 5:-0.164384 6:-1 7:1 8:0.160305 9:1 10:-1 12:1 13:1 -1 1:-0.333333 2:1 3:1 4:-0.811321 5:-0.625571 6:-1 7:1 8:0.175573 9:1 10:-0.0322581 12:-1 13:-1 -1 1:-0.583333 2:-1 3:0.333333 4:-1 5:-0.666667 6:-1 7:-1 8:0.648855 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.458333 2:-1 3:0.333333 4:-0.509434 5:-0.621005 6:-1 7:-1 8:0.557252 9:-1 10:-1 12:-1 13:-1 -1 1:0.125 2:1 3:-0.333333 4:-0.509434 5:-0.497717 6:-1 7:-1 8:0.633588 9:-1 10:-0.741935 11:-1 12:-1 13:-1 +1 1:0.208333 2:1 3:1 4:-0.0188679 5:-0.579909 6:-1 7:-1 8:-0.480916 9:-1 10:-0.354839 12:-0.333333 13:1 +1 1:-0.75 2:1 3:1 4:-0.509434 5:-0.671233 6:-1 7:-1 8:-0.0992366 9:1 10:-0.483871 12:-1 13:1 +1 1:0.208333 2:1 3:1 4:0.0566038 5:-0.342466 6:-1 7:1 8:-0.389313 9:1 10:-0.741935 11:-1 12:-1 13:1 -1 1:-0.5 2:1 3:0.333333 4:-0.320755 5:-0.598174 6:-1 7:1 8:0.480916 9:-1 10:-0.354839 12:-1 13:-1 -1 1:0.166667 2:1 3:1 4:-0.698113 5:-0.657534 6:-1 7:-1 8:-0.160305 9:1 10:-0.516129 12:-1 13:0.5 -1 1:-0.458333 2:1 3:-1 4:0.0188679 5:-0.461187 6:-1 7:1 8:0.633588 9:-1 10:-0.741935 11:-1 12:0.333333 13:-1 -1 1:0.375 2:1 3:-0.333333 4:-0.358491 5:-0.625571 6:1 7:1 8:0.0534351 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.25 2:1 3:-1 4:0.584906 5:-0.342466 6:-1 7:1 8:0.129771 9:-1 10:0.354839 11:1 12:-1 13:1 -1 1:-0.5 2:-1 3:-0.333333 4:-0.396226 5:-0.178082 6:-1 7:-1 8:0.40458 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.125 2:1 3:1 4:0.0566038 5:-0.465753 6:-1 7:1 8:-0.129771 9:-1 10:-0.16129 12:-1 13:1 -1 1:0.25 2:1 3:-0.333333 4:-0.132075 5:-0.56621 6:-1 7:-1 8:0.419847 9:1 10:-1 11:-1 12:-1 13:-1 +1 1:0.333333 2:-1 3:1 4:-0.320755 5:-0.0684932 6:-1 7:1 8:0.496183 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.0416667 2:1 3:1 4:-0.433962 5:-0.360731 6:-1 7:1 8:-0.419847 9:1 10:-0.290323 12:-0.333333 13:1 +1 1:0.0416667 2:1 3:1 4:-0.698113 5:-0.634703 6:-1 7:1 8:-0.435115 9:1 10:-1 12:-0.333333 13:-1 +1 1:-0.0416667 2:1 3:1 4:-0.415094 5:-0.607306 6:-1 7:-1 8:0.480916 9:-1 10:-0.677419 11:-1 12:0.333333 13:1 +1 1:-0.25 2:1 3:1 4:-0.698113 5:-0.319635 6:-1 7:1 8:-0.282443 9:1 10:-0.677419 12:-0.333333 13:-1 -1 1:0.541667 2:1 3:1 4:-0.509434 5:-0.196347 6:-1 7:1 8:0.221374 9:-1 10:-0.870968 12:-1 13:-1 +1 1:0.208333 2:1 3:1 4:-0.886792 5:-0.506849 6:-1 7:-1 8:0.29771 9:-1 10:-0.967742 11:-1 12:-0.333333 13:1 -1 1:0.458333 2:-1 3:0.333333 4:-0.132075 5:-0.146119 6:-1 7:-1 8:-0.0534351 9:-1 10:-0.935484 11:-1 12:-1 13:1 -1 1:-0.125 2:-1 3:-0.333333 4:-0.509434 5:-0.461187 6:-1 7:-1 8:0.389313 9:-1 10:-0.645161 11:-1 12:-1 13:-1 -1 1:-0.375 2:-1 3:0.333333 4:-0.735849 5:-0.931507 6:-1 7:-1 8:0.587786 9:-1 10:-0.806452 12:-1 13:-1 +1 1:0.583333 2:1 3:1 4:-0.509434 5:-0.493151 6:-1 7:-1 8:-1 9:-1 10:-0.677419 12:-1 13:-1 -1 1:-0.166667 2:-1 3:1 4:-0.320755 5:-0.347032 6:-1 7:-1 8:0.40458 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.166667 2:1 3:1 4:0.339623 5:-0.255708 6:1 7:1 8:-0.19084 9:-1 10:-0.677419 12:1 13:1 +1 1:0.416667 2:1 3:1 4:-0.320755 5:-0.415525 6:-1 7:1 8:0.160305 9:-1 10:-0.548387 12:-0.333333 13:1 +1 1:-0.208333 2:1 3:1 4:-0.433962 5:-0.324201 6:-1 7:1 8:0.450382 9:-1 10:-0.83871 12:-1 13:1 -1 1:-0.0833333 2:1 3:0.333333 4:-0.886792 5:-0.561644 6:-1 7:-1 8:0.0992366 9:1 10:-0.612903 12:-1 13:-1 +1 1:0.291667 2:-1 3:1 4:0.0566038 5:-0.39726 6:-1 7:1 8:0.312977 9:-1 10:-0.16129 12:0.333333 13:1 +1 1:0.25 2:1 3:1 4:-0.132075 5:-0.767123 6:-1 7:-1 8:0.389313 9:1 10:-1 11:-1 12:-0.333333 13:1 -1 1:-0.333333 2:-1 3:-0.333333 4:-0.660377 5:-0.844749 6:-1 7:-1 8:0.0229008 9:-1 10:-1 12:-1 13:-1 +1 1:0.0833333 2:-1 3:1 4:0.622642 5:-0.0821918 6:-1 8:-0.29771 9:1 10:0.0967742 12:-1 13:-1 -1 1:-0.5 2:1 3:-0.333333 4:-0.698113 5:-0.502283 6:-1 7:-1 8:0.251908 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.291667 2:-1 3:1 4:0.207547 5:-0.182648 6:-1 7:1 8:0.374046 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.0416667 2:-1 3:0.333333 4:-0.226415 5:-0.187215 6:1 7:-1 8:0.51145 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.458333 2:1 3:-0.333333 4:-0.509434 5:-0.228311 6:-1 7:-1 8:0.389313 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.166667 2:-1 3:-0.333333 4:-0.245283 5:-0.3379 6:-1 7:-1 8:0.389313 9:-1 10:-1 12:-1 13:-1 +1 1:-0.291667 2:1 3:1 4:-0.509434 5:-0.438356 6:-1 7:1 8:0.114504 9:-1 10:-0.741935 11:-1 12:-1 13:1 +1 1:0.125 2:-1 3:1 4:1 5:-0.260274 6:1 7:1 8:-0.0534351 9:1 10:0.290323 11:1 12:0.333333 13:1 -1 1:0.541667 2:-1 3:-1 4:0.0566038 5:-0.543379 6:-1 7:-1 8:-0.343511 9:-1 10:-0.16129 11:1 12:-1 13:-1 +1 1:0.125 2:1 3:1 4:-0.320755 5:-0.283105 6:1 7:1 8:-0.51145 9:1 10:-0.483871 11:1 12:-1 13:1 +1 1:-0.166667 2:1 3:0.333333 4:-0.509434 5:-0.716895 6:-1 7:-1 8:0.0381679 9:-1 10:-0.354839 12:1 13:1 +1 1:0.0416667 2:1 3:1 4:-0.471698 5:-0.269406 6:-1 7:1 8:-0.312977 9:1 10:0.0322581 12:0.333333 13:-1 +1 1:0.166667 2:1 3:1 4:0.0943396 5:-0.324201 6:-1 7:-1 8:-0.740458 9:1 10:-0.612903 12:-0.333333 13:1 -1 1:0.5 2:-1 3:0.333333 4:0.245283 5:0.0684932 6:-1 7:1 8:0.221374 9:-1 10:-0.741935 11:-1 12:-1 13:-1 -1 1:0.0416667 2:1 3:0.333333 4:-0.415094 5:-0.328767 6:-1 7:1 8:0.236641 9:-1 10:-0.83871 11:1 12:-0.333333 13:-1 -1 1:0.0416667 2:-1 3:0.333333 4:0.245283 5:-0.657534 6:-1 7:-1 8:0.40458 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:0.375 2:1 3:1 4:-0.509434 5:-0.356164 6:-1 7:-1 8:-0.572519 9:1 10:-0.419355 12:0.333333 13:1 -1 1:-0.0416667 2:-1 3:0.333333 4:-0.207547 5:-0.680365 6:-1 7:1 8:0.496183 9:-1 10:-0.967742 12:-1 13:-1 -1 1:-0.0416667 2:1 3:-0.333333 4:-0.245283 5:-0.657534 6:-1 7:-1 8:0.328244 9:-1 10:-0.741935 11:-1 12:-0.333333 13:-1 +1 1:0.291667 2:1 3:1 4:-0.566038 5:-0.525114 6:1 7:-1 8:0.358779 9:1 10:-0.548387 11:-1 12:0.333333 13:1 +1 1:0.416667 2:-1 3:1 4:-0.735849 5:-0.347032 6:-1 7:-1 8:0.496183 9:1 10:-0.419355 12:0.333333 13:-1 +1 1:0.541667 2:1 3:1 4:-0.660377 5:-0.607306 6:-1 7:1 8:-0.0687023 9:1 10:-0.967742 11:-1 12:-0.333333 13:-1 -1 1:-0.458333 2:1 3:1 4:-0.132075 5:-0.543379 6:-1 7:-1 8:0.633588 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.458333 2:1 3:1 4:-0.509434 5:-0.452055 6:-1 7:1 8:-0.618321 9:1 10:-0.290323 11:1 12:-0.333333 13:-1 -1 1:0.0416667 2:1 3:0.333333 4:0.0566038 5:-0.515982 6:-1 7:1 8:0.435115 9:-1 10:-0.483871 11:-1 12:-1 13:1 -1 1:-0.291667 2:-1 3:0.333333 4:-0.0943396 5:-0.767123 6:-1 7:1 8:0.358779 9:1 10:-0.548387 11:1 12:-1 13:-1 -1 1:0.583333 2:-1 3:0.333333 4:0.0943396 5:-0.310502 6:-1 7:-1 8:0.541985 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:0.125 2:1 3:1 4:-0.415094 5:-0.438356 6:1 7:1 8:0.114504 9:1 10:-0.612903 12:-0.333333 13:-1 -1 1:-0.791667 2:-1 3:-0.333333 4:-0.54717 5:-0.616438 6:-1 7:-1 8:0.847328 9:-1 10:-0.774194 11:-1 12:-1 13:-1 -1 1:0.166667 2:1 3:1 4:-0.283019 5:-0.630137 6:-1 7:-1 8:0.480916 9:1 10:-1 11:-1 12:-1 13:1 +1 1:0.458333 2:1 3:1 4:-0.0377358 5:-0.607306 6:-1 7:1 8:-0.0687023 9:-1 10:-0.354839 12:0.333333 13:0.5 -1 1:0.25 2:1 3:1 4:-0.169811 5:-0.3379 6:-1 7:1 8:0.694656 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.125 2:1 3:0.333333 4:-0.132075 5:-0.511416 6:-1 7:-1 8:0.40458 9:-1 10:-0.806452 12:-0.333333 13:1 -1 1:-0.0833333 2:1 3:-1 4:-0.415094 5:-0.60274 6:-1 7:1 8:-0.175573 9:1 10:-0.548387 11:-1 12:-0.333333 13:-1 +1 1:0.0416667 2:1 3:-0.333333 4:0.849057 5:-0.283105 6:-1 7:1 8:0.89313 9:-1 10:-1 11:-1 12:-0.333333 13:1 +1 2:1 3:1 4:-0.45283 5:-0.287671 6:-1 7:-1 8:-0.633588 9:1 10:-0.354839 12:0.333333 13:1 +1 1:-0.0416667 2:1 3:1 4:-0.660377 5:-0.525114 6:-1 7:-1 8:0.358779 9:-1 10:-1 11:-1 12:-0.333333 13:-1 +1 1:-0.541667 2:1 3:1 4:-0.698113 5:-0.812785 6:-1 7:1 8:-0.343511 9:1 10:-0.354839 12:-1 13:1 +1 1:0.208333 2:1 3:0.333333 4:-0.283019 5:-0.552511 6:-1 7:1 8:0.557252 9:-1 10:0.0322581 11:-1 12:0.333333 13:1 -1 1:-0.5 2:-1 3:0.333333 4:-0.660377 5:-0.351598 6:-1 7:1 8:0.541985 9:1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.5 2:1 3:0.333333 4:-0.660377 5:-0.43379 6:-1 7:-1 8:0.648855 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.125 2:-1 3:0.333333 4:-0.509434 5:-0.575342 6:-1 7:-1 8:0.328244 9:-1 10:-0.483871 12:-1 13:-1 -1 1:0.0416667 2:-1 3:0.333333 4:-0.735849 5:-0.356164 6:-1 7:1 8:0.465649 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.458333 2:-1 3:1 4:-0.320755 5:-0.191781 6:-1 7:-1 8:-0.221374 9:-1 10:-0.354839 12:0.333333 13:-1 -1 1:-0.0833333 2:-1 3:0.333333 4:-0.320755 5:-0.406393 6:-1 7:1 8:0.19084 9:-1 10:-0.83871 11:-1 12:-1 13:-1 -1 1:-0.291667 2:-1 3:-0.333333 4:-0.792453 5:-0.643836 6:-1 7:-1 8:0.541985 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.0833333 2:1 3:1 4:-0.132075 5:-0.584475 6:-1 7:-1 8:-0.389313 9:1 10:0.806452 11:1 12:-1 13:1 -1 1:-0.333333 2:1 3:-0.333333 4:-0.358491 5:-0.16895 6:-1 7:1 8:0.51145 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:0.125 2:1 3:-1 4:-0.509434 5:-0.694064 6:-1 7:1 8:0.389313 9:-1 10:-0.387097 12:-1 13:1 +1 1:0.541667 2:-1 3:1 4:0.584906 5:-0.534247 6:1 7:-1 8:0.435115 9:1 10:-0.677419 12:0.333333 13:1 +1 1:-0.625 2:1 3:-1 4:-0.509434 5:-0.520548 6:-1 7:-1 8:0.694656 9:1 10:0.225806 12:-1 13:1 +1 1:0.375 2:-1 3:1 4:0.0566038 5:-0.461187 6:-1 7:-1 8:0.267176 9:1 10:-0.548387 12:-1 13:-1 -1 1:0.0833333 2:1 3:-0.333333 4:-0.320755 5:-0.378995 6:-1 7:-1 8:0.282443 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.208333 2:1 3:1 4:-0.358491 5:-0.392694 6:-1 7:1 8:-0.0992366 9:1 10:-0.0322581 12:0.333333 13:1 -1 1:-0.416667 2:1 3:1 4:-0.698113 5:-0.611872 6:-1 7:-1 8:0.374046 9:-1 10:-1 11:-1 12:-1 13:1 -1 1:0.458333 2:-1 3:1 4:0.622642 5:-0.0913242 6:-1 7:-1 8:0.267176 9:1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.125 2:-1 3:1 4:-0.698113 5:-0.415525 6:-1 7:1 8:0.343511 9:-1 10:-1 11:-1 12:-1 13:-1 -1 2:1 3:0.333333 4:-0.320755 5:-0.675799 6:1 7:1 8:0.236641 9:-1 10:-0.612903 11:1 12:-1 13:-1 -1 1:-0.333333 2:-1 3:1 4:-0.169811 5:-0.497717 6:-1 7:1 8:0.236641 9:1 10:-0.935484 12:-1 13:-1 +1 1:0.5 2:1 3:-1 4:-0.169811 5:-0.287671 6:1 7:1 8:0.572519 9:-1 10:-0.548387 12:-0.333333 13:-1 -1 1:0.666667 2:1 3:-1 4:0.245283 5:-0.506849 6:1 7:1 8:-0.0839695 9:-1 10:-0.967742 12:-0.333333 13:-1 +1 1:0.666667 2:1 3:0.333333 4:-0.132075 5:-0.415525 6:-1 7:1 8:0.145038 9:-1 10:-0.354839 12:1 13:1 +1 1:0.583333 2:1 3:1 4:-0.886792 5:-0.210046 6:-1 7:1 8:-0.175573 9:1 10:-0.709677 12:0.333333 13:-1 -1 1:0.625 2:-1 3:0.333333 4:-0.509434 5:-0.611872 6:-1 7:1 8:-0.328244 9:-1 10:-0.516129 12:-1 13:-1 -1 1:-0.791667 2:1 3:-1 4:-0.54717 5:-0.744292 6:-1 7:1 8:0.572519 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.375 2:-1 3:1 4:-0.169811 5:-0.232877 6:1 7:-1 8:-0.465649 9:-1 10:-0.387097 12:1 13:-1 +1 1:-0.0833333 2:1 3:1 4:-0.132075 5:-0.214612 6:-1 7:-1 8:-0.221374 9:1 10:0.354839 12:1 13:1 +1 1:-0.291667 2:1 3:0.333333 4:0.0566038 5:-0.520548 6:-1 7:-1 8:0.160305 9:-1 10:0.16129 12:-1 13:-1 +1 1:0.583333 2:1 3:1 4:-0.415094 5:-0.415525 6:1 7:-1 8:0.40458 9:-1 10:-0.935484 12:0.333333 13:1 -1 1:-0.125 2:1 3:0.333333 4:-0.339623 5:-0.680365 6:-1 7:-1 8:0.40458 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.458333 2:1 3:0.333333 4:-0.509434 5:-0.479452 6:1 7:-1 8:0.877863 9:-1 10:-0.741935 11:1 12:-1 13:1 +1 1:0.125 2:-1 3:1 4:-0.245283 5:0.292237 6:-1 7:1 8:0.206107 9:1 10:-0.387097 12:0.333333 13:1 +1 1:-0.5 2:1 3:1 4:-0.698113 5:-0.789954 6:-1 7:1 8:0.328244 9:-1 10:-1 11:-1 12:-1 13:1 -1 1:-0.458333 2:-1 3:1 4:-0.849057 5:-0.365297 6:-1 7:1 8:-0.221374 9:-1 10:-0.806452 12:-1 13:-1 -1 2:1 3:0.333333 4:-0.320755 5:-0.452055 6:1 7:1 8:0.557252 9:-1 10:-1 11:-1 12:1 13:-1 -1 1:-0.416667 2:1 3:0.333333 4:-0.320755 5:-0.136986 6:-1 7:-1 8:0.389313 9:-1 10:-0.387097 11:-1 12:-0.333333 13:-1 +1 1:0.125 2:1 3:1 4:-0.283019 5:-0.73516 6:-1 7:1 8:-0.480916 9:1 10:-0.322581 12:-0.333333 13:0.5 -1 1:-0.0416667 2:1 3:1 4:-0.735849 5:-0.511416 6:1 7:-1 8:0.160305 9:-1 10:-0.967742 11:-1 12:1 13:1 -1 1:0.375 2:-1 3:1 4:-0.132075 5:0.223744 6:-1 7:1 8:0.312977 9:-1 10:-0.612903 12:-1 13:-1 +1 1:0.708333 2:1 3:0.333333 4:0.245283 5:-0.347032 6:-1 7:-1 8:-0.374046 9:1 10:-0.0645161 12:-0.333333 13:1 -1 1:0.0416667 2:1 3:1 4:-0.132075 5:-0.484018 6:-1 7:-1 8:0.358779 9:-1 10:-0.612903 11:-1 12:-1 13:-1 +1 1:0.708333 2:1 3:1 4:-0.0377358 5:-0.780822 6:-1 7:-1 8:-0.175573 9:1 10:-0.16129 11:1 12:-1 13:1 -1 1:0.0416667 2:1 3:-0.333333 4:-0.735849 5:-0.164384 6:-1 7:-1 8:0.29771 9:-1 10:-1 11:-1 12:-1 13:1 +1 1:-0.75 2:1 3:1 4:-0.396226 5:-0.287671 6:-1 7:1 8:0.29771 9:1 10:-1 11:-1 12:-1 13:1 -1 1:-0.208333 2:1 3:0.333333 4:-0.433962 5:-0.410959 6:1 7:-1 8:0.587786 9:-1 10:-1 11:-1 12:0.333333 13:-1 -1 1:0.0833333 2:-1 3:-0.333333 4:-0.226415 5:-0.43379 6:-1 7:1 8:0.374046 9:-1 10:-0.548387 12:-1 13:-1 -1 1:0.208333 2:-1 3:1 4:-0.886792 5:-0.442922 6:-1 7:1 8:-0.221374 9:-1 10:-0.677419 12:-1 13:-1 -1 1:0.0416667 2:-1 3:0.333333 4:-0.698113 5:-0.598174 6:-1 7:-1 8:0.328244 9:-1 10:-0.483871 12:-1 13:-1 -1 1:0.666667 2:-1 3:-1 4:-0.132075 5:-0.484018 6:-1 7:-1 8:0.221374 9:-1 10:-0.419355 11:-1 12:0.333333 13:-1 +1 1:1 2:1 3:1 4:-0.415094 5:-0.187215 6:-1 7:1 8:0.389313 9:1 10:-1 11:-1 12:1 13:-1 -1 1:0.625 2:1 3:0.333333 4:-0.54717 5:-0.310502 6:-1 7:-1 8:0.221374 9:-1 10:-0.677419 11:-1 12:-0.333333 13:1 +1 1:0.208333 2:1 3:1 4:-0.415094 5:-0.205479 6:-1 7:1 8:0.526718 9:-1 10:-1 11:-1 12:0.333333 13:1 +1 1:0.291667 2:1 3:1 4:-0.415094 5:-0.39726 6:-1 7:1 8:0.0687023 9:1 10:-0.0967742 12:-0.333333 13:1 +1 1:-0.0833333 2:1 3:1 4:-0.132075 5:-0.210046 6:-1 7:-1 8:0.557252 9:1 10:-0.483871 11:-1 12:-1 13:1 +1 1:0.0833333 2:1 3:1 4:0.245283 5:-0.255708 6:-1 7:1 8:0.129771 9:1 10:-0.741935 12:-0.333333 13:1 -1 1:-0.0416667 2:1 3:-1 4:0.0943396 5:-0.214612 6:1 7:-1 8:0.633588 9:-1 10:-0.612903 12:-1 13:1 -1 1:0.291667 2:-1 3:0.333333 4:-0.849057 5:-0.123288 6:-1 7:-1 8:0.358779 9:-1 10:-1 11:-1 12:-0.333333 13:-1 -1 1:0.208333 2:1 3:0.333333 4:-0.792453 5:-0.479452 6:-1 7:1 8:0.267176 9:1 10:-0.806452 12:-1 13:1 +1 1:0.458333 2:1 3:0.333333 4:-0.415094 5:-0.164384 6:-1 7:-1 8:-0.0839695 9:1 10:-0.419355 12:-1 13:1 -1 1:-0.666667 2:1 3:0.333333 4:-0.320755 5:-0.43379 6:-1 7:-1 8:0.770992 9:-1 10:0.129032 11:1 12:-1 13:-1 +1 1:0.25 2:1 3:-1 4:0.433962 5:-0.260274 6:-1 7:1 8:0.343511 9:-1 10:-0.935484 12:-1 13:1 -1 1:-0.0833333 2:1 3:0.333333 4:-0.415094 5:-0.456621 6:1 7:1 8:0.450382 9:-1 10:-0.225806 12:-1 13:-1 -1 1:-0.416667 2:-1 3:0.333333 4:-0.471698 5:-0.60274 6:-1 7:-1 8:0.435115 9:-1 10:-0.935484 12:-1 13:-1 +1 1:0.208333 2:1 3:1 4:-0.358491 5:-0.589041 6:-1 7:1 8:-0.0839695 9:1 10:-0.290323 12:1 13:1 -1 1:-1 2:1 3:-0.333333 4:-0.320755 5:-0.643836 6:-1 7:1 8:1 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.5 2:-1 3:-0.333333 4:-0.320755 5:-0.643836 6:-1 7:1 8:0.541985 9:-1 10:-0.548387 11:-1 12:-1 13:-1 -1 1:0.416667 2:-1 3:0.333333 4:-0.226415 5:-0.424658 6:-1 7:1 8:0.541985 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.0833333 2:1 3:0.333333 4:-1 5:-0.538813 6:-1 7:-1 8:0.267176 9:1 10:-1 11:-1 12:-0.333333 13:1 -1 1:0.0416667 2:1 3:0.333333 4:-0.509434 5:-0.39726 6:-1 7:1 8:0.160305 9:-1 10:-0.870968 12:-1 13:1 -1 1:-0.375 2:1 3:-0.333333 4:-0.509434 5:-0.570776 6:-1 7:-1 8:0.51145 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.0416667 2:1 3:1 4:-0.698113 5:-0.484018 6:-1 7:-1 8:-0.160305 9:1 10:-0.0967742 12:-0.333333 13:1 +1 1:0.5 2:1 3:1 4:-0.226415 5:-0.415525 6:-1 7:1 8:-0.145038 9:-1 10:-0.0967742 12:-0.333333 13:1 -1 1:0.166667 2:1 3:0.333333 4:0.0566038 5:-0.808219 6:-1 7:-1 8:0.572519 9:-1 10:-0.483871 11:-1 12:-1 13:-1 +1 1:0.416667 2:1 3:1 4:-0.320755 5:-0.0684932 6:1 7:1 8:-0.0687023 9:1 10:-0.419355 11:-1 12:1 13:1 -1 1:-0.75 2:-1 3:1 4:-0.169811 5:-0.739726 6:-1 7:-1 8:0.694656 9:-1 10:-0.548387 11:-1 12:-1 13:-1 -1 1:-0.5 2:1 3:-0.333333 4:-0.226415 5:-0.648402 6:-1 7:-1 8:-0.0687023 9:-1 10:-1 12:-1 13:0.5 +1 1:0.375 2:-1 3:0.333333 4:-0.320755 5:-0.374429 6:-1 7:-1 8:-0.603053 9:-1 10:-0.612903 12:-0.333333 13:1 +1 1:-0.416667 2:-1 3:1 4:-0.283019 5:-0.0182648 6:1 7:1 8:-0.00763359 9:1 10:-0.0322581 12:-1 13:1 -1 1:0.208333 2:-1 3:-1 4:0.0566038 5:-0.283105 6:1 7:1 8:0.389313 9:-1 10:-0.677419 11:-1 12:-1 13:-1 -1 1:-0.0416667 2:1 3:-1 4:-0.54717 5:-0.726027 6:-1 7:1 8:0.816794 9:-1 10:-1 12:-1 13:0.5 +1 1:0.333333 2:-1 3:1 4:-0.0377358 5:-0.173516 6:-1 7:1 8:0.145038 9:1 10:-0.677419 12:-1 13:1 +1 1:-0.583333 2:1 3:1 4:-0.54717 5:-0.575342 6:-1 7:-1 8:0.0534351 9:-1 10:-0.612903 12:-1 13:1 -1 1:-0.333333 2:1 3:1 4:-0.603774 5:-0.388128 6:-1 7:1 8:0.740458 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.0416667 2:1 3:1 4:-0.358491 5:-0.410959 6:-1 7:-1 8:0.374046 9:1 10:-1 11:-1 12:-0.333333 13:1 -1 1:0.375 2:1 3:0.333333 4:-0.320755 5:-0.520548 6:-1 7:-1 8:0.145038 9:-1 10:-0.419355 12:1 13:1 +1 1:0.375 2:-1 3:1 4:0.245283 5:-0.826484 6:-1 7:1 8:0.129771 9:-1 10:1 11:1 12:1 13:1 -1 2:-1 3:1 4:-0.169811 5:-0.506849 6:-1 7:1 8:0.358779 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.416667 2:1 3:1 4:-0.509434 5:-0.767123 6:-1 7:1 8:-0.251908 9:1 10:-0.193548 12:-1 13:1 -1 1:-0.25 2:1 3:0.333333 4:-0.169811 5:-0.401826 6:-1 7:1 8:0.29771 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.0416667 2:1 3:-0.333333 4:-0.509434 5:-0.0913242 6:-1 7:-1 8:0.541985 9:-1 10:-0.935484 11:-1 12:-1 13:-1 +1 1:0.625 2:1 3:0.333333 4:0.622642 5:-0.324201 6:1 7:1 8:0.206107 9:1 10:-0.483871 12:-1 13:1 -1 1:-0.583333 2:1 3:0.333333 4:-0.132075 5:-0.109589 6:-1 7:1 8:0.694656 9:-1 10:-1 11:-1 12:-1 13:-1 -1 2:-1 3:1 4:-0.320755 5:-0.369863 6:-1 7:1 8:0.0992366 9:-1 10:-0.870968 12:-1 13:-1 +1 1:0.375 2:-1 3:1 4:-0.132075 5:-0.351598 6:-1 7:1 8:0.358779 9:-1 10:0.16129 11:1 12:0.333333 13:-1 -1 1:-0.0833333 2:-1 3:0.333333 4:-0.132075 5:-0.16895 6:-1 7:1 8:0.0839695 9:-1 10:-0.516129 11:-1 12:-0.333333 13:-1 +1 1:0.291667 2:1 3:1 4:-0.320755 5:-0.420091 6:-1 7:-1 8:0.114504 9:1 10:-0.548387 11:-1 12:-0.333333 13:1 +1 1:0.5 2:1 3:1 4:-0.698113 5:-0.442922 6:-1 7:1 8:0.328244 9:-1 10:-0.806452 11:-1 12:0.333333 13:0.5 -1 1:0.5 2:-1 3:0.333333 4:0.150943 5:-0.347032 6:-1 7:-1 8:0.175573 9:-1 10:-0.741935 11:-1 12:-1 13:-1 +1 1:0.291667 2:1 3:0.333333 4:-0.132075 5:-0.730594 6:-1 7:1 8:0.282443 9:-1 10:-0.0322581 12:-1 13:-1 +1 1:0.291667 2:1 3:1 4:-0.0377358 5:-0.287671 6:-1 7:1 8:0.0839695 9:1 10:-0.0967742 12:0.333333 13:1 +1 1:0.0416667 2:1 3:1 4:-0.509434 5:-0.716895 6:-1 7:-1 8:-0.358779 9:-1 10:-0.548387 12:-0.333333 13:1 -1 1:-0.375 2:1 3:-0.333333 4:-0.320755 5:-0.575342 6:-1 7:1 8:0.78626 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:-0.375 2:1 3:1 4:-0.660377 5:-0.251142 6:-1 7:1 8:0.251908 9:-1 10:-1 11:-1 12:-0.333333 13:-1 -1 1:-0.0833333 2:1 3:0.333333 4:-0.698113 5:-0.776256 6:-1 7:-1 8:-0.206107 9:-1 10:-0.806452 11:-1 12:-1 13:-1 -1 1:0.25 2:1 3:0.333333 4:0.0566038 5:-0.607306 6:1 7:-1 8:0.312977 9:-1 10:-0.483871 11:-1 12:-1 13:-1 -1 1:0.75 2:-1 3:-0.333333 4:0.245283 5:-0.196347 6:-1 7:-1 8:0.389313 9:-1 10:-0.870968 11:-1 12:0.333333 13:-1 -1 1:0.333333 2:1 3:0.333333 4:0.0566038 5:-0.465753 6:1 7:-1 8:0.00763359 9:1 10:-0.677419 12:-1 13:-1 +1 1:0.0833333 2:1 3:1 4:-0.283019 5:0.0365297 6:-1 7:-1 8:-0.0687023 9:1 10:-0.612903 12:-0.333333 13:1 +1 1:0.458333 2:1 3:0.333333 4:-0.132075 5:-0.0456621 6:-1 7:-1 8:0.328244 9:-1 10:-1 11:-1 12:-1 13:-1 -1 1:-0.416667 2:1 3:1 4:0.0566038 5:-0.447489 6:-1 7:-1 8:0.526718 9:-1 10:-0.516129 11:-1 12:-1 13:-1 -1 1:0.208333 2:-1 3:0.333333 4:-0.509434 5:-0.0228311 6:-1 7:-1 8:0.541985 9:-1 10:-1 11:-1 12:-1 13:-1 +1 1:0.291667 2:1 3:1 4:-0.320755 5:-0.634703 6:-1 7:1 8:-0.0687023 9:1 10:-0.225806 12:0.333333 13:1 +1 1:0.208333 2:1 3:-0.333333 4:-0.509434 5:-0.278539 6:-1 7:1 8:0.358779 9:-1 10:-0.419355 12:-1 13:-1 -1 1:-0.166667 2:1 3:-0.333333 4:-0.320755 5:-0.360731 6:-1 7:-1 8:0.526718 9:-1 10:-0.806452 11:-1 12:-1 13:-1 +1 1:-0.208333 2:1 3:-0.333333 4:-0.698113 5:-0.52968 6:-1 7:-1 8:0.480916 9:-1 10:-0.677419 11:1 12:-1 13:1 -1 1:-0.0416667 2:1 3:0.333333 4:0.471698 5:-0.666667 6:1 7:-1 8:0.389313 9:-1 10:-0.83871 11:-1 12:-1 13:1 -1 1:-0.375 2:1 3:-0.333333 4:-0.509434 5:-0.374429 6:-1 7:-1 8:0.557252 9:-1 10:-1 11:-1 12:-1 13:1 -1 1:0.125 2:-1 3:-0.333333 4:-0.132075 5:-0.232877 6:-1 7:1 8:0.251908 9:-1 10:-0.580645 12:-1 13:-1 -1 1:0.166667 2:1 3:1 4:-0.132075 5:-0.69863 6:-1 7:-1 8:0.175573 9:-1 10:-0.870968 12:-1 13:0.5 +1 1:0.583333 2:1 3:1 4:0.245283 5:-0.269406 6:-1 7:1 8:-0.435115 9:1 10:-0.516129 12:1 13:-1 ================================================ FILE: Matlab/liblinear-1.96/linear.cpp ================================================ #include #include #include #include #include #include #include "linear.h" #include "tron.h" typedef signed char schar; template static inline void swap(T& x, T& y) { T t=x; x=y; y=t; } #ifndef min template static inline T min(T x,T y) { return (x static inline T max(T x,T y) { return (x>y)?x:y; } #endif template static inline void clone(T*& dst, S* src, int n) { dst = new T[n]; memcpy((void *)dst,(void *)src,sizeof(T)*n); } #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define INF HUGE_VAL static void print_string_stdout(const char *s) { fputs(s,stdout); fflush(stdout); } static void (*liblinear_print_string) (const char *) = &print_string_stdout; #if 1 static void info(const char *fmt,...) { char buf[BUFSIZ]; va_list ap; va_start(ap,fmt); vsprintf(buf,fmt,ap); va_end(ap); (*liblinear_print_string)(buf); } #else static void info(const char *fmt,...) {} #endif class l2r_lr_fun: public function { public: l2r_lr_fun(const problem *prob, double *C); ~l2r_lr_fun(); double fun(double *w); void grad(double *w, double *g); void Hv(double *s, double *Hs); int get_nr_variable(void); private: void Xv(double *v, double *Xv); void XTv(double *v, double *XTv); double *C; double *z; double *D; const problem *prob; }; l2r_lr_fun::l2r_lr_fun(const problem *prob, double *C) { int l=prob->l; this->prob = prob; z = new double[l]; D = new double[l]; this->C = C; } l2r_lr_fun::~l2r_lr_fun() { delete[] z; delete[] D; } double l2r_lr_fun::fun(double *w) { int i; double f=0; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); Xv(w, z); for(i=0;i= 0) f += C[i]*log(1 + exp(-yz)); else f += C[i]*(-yz+log(1 + exp(yz))); } return(f); } void l2r_lr_fun::grad(double *w, double *g) { int i; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); for(i=0;in; } void l2r_lr_fun::Hv(double *s, double *Hs) { int i; int l=prob->l; int w_size=get_nr_variable(); double *wa = new double[l]; Xv(s, wa); for(i=0;il; feature_node **x=prob->x; for(i=0;iindex!=-1) { Xv[i]+=v[s->index-1]*s->value; s++; } } } void l2r_lr_fun::XTv(double *v, double *XTv) { int i; int l=prob->l; int w_size=get_nr_variable(); feature_node **x=prob->x; for(i=0;iindex!=-1) { XTv[s->index-1]+=v[i]*s->value; s++; } } } class l2r_l2_svc_fun: public function { public: l2r_l2_svc_fun(const problem *prob, double *C); ~l2r_l2_svc_fun(); double fun(double *w); void grad(double *w, double *g); void Hv(double *s, double *Hs); int get_nr_variable(void); protected: void Xv(double *v, double *Xv); void subXv(double *v, double *Xv); void subXTv(double *v, double *XTv); double *C; double *z; double *D; int *I; int sizeI; const problem *prob; }; l2r_l2_svc_fun::l2r_l2_svc_fun(const problem *prob, double *C) { int l=prob->l; this->prob = prob; z = new double[l]; D = new double[l]; I = new int[l]; this->C = C; } l2r_l2_svc_fun::~l2r_l2_svc_fun() { delete[] z; delete[] D; delete[] I; } double l2r_l2_svc_fun::fun(double *w) { int i; double f=0; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); Xv(w, z); for(i=0;i 0) f += C[i]*d*d; } return(f); } void l2r_l2_svc_fun::grad(double *w, double *g) { int i; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); sizeI = 0; for (i=0;in; } void l2r_l2_svc_fun::Hv(double *s, double *Hs) { int i; int w_size=get_nr_variable(); double *wa = new double[sizeI]; subXv(s, wa); for(i=0;il; feature_node **x=prob->x; for(i=0;iindex!=-1) { Xv[i]+=v[s->index-1]*s->value; s++; } } } void l2r_l2_svc_fun::subXv(double *v, double *Xv) { int i; feature_node **x=prob->x; for(i=0;iindex!=-1) { Xv[i]+=v[s->index-1]*s->value; s++; } } } void l2r_l2_svc_fun::subXTv(double *v, double *XTv) { int i; int w_size=get_nr_variable(); feature_node **x=prob->x; for(i=0;iindex!=-1) { XTv[s->index-1]+=v[i]*s->value; s++; } } } class l2r_l2_svr_fun: public l2r_l2_svc_fun { public: l2r_l2_svr_fun(const problem *prob, double *C, double p); double fun(double *w); void grad(double *w, double *g); private: double p; }; l2r_l2_svr_fun::l2r_l2_svr_fun(const problem *prob, double *C, double p): l2r_l2_svc_fun(prob, C) { this->p = p; } double l2r_l2_svr_fun::fun(double *w) { int i; double f=0; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); double d; Xv(w, z); for(i=0;i p) f += C[i]*(d-p)*(d-p); } return(f); } void l2r_l2_svr_fun::grad(double *w, double *g) { int i; double *y=prob->y; int l=prob->l; int w_size=get_nr_variable(); double d; sizeI = 0; for(i=0;i p) { z[sizeI] = C[i]*(d-p); I[sizeI] = i; sizeI++; } } subXTv(z, g); for(i=0;iy[i]) // To support weights for instances, use GETI(i) (i) class Solver_MCSVM_CS { public: Solver_MCSVM_CS(const problem *prob, int nr_class, double *C, double eps=0.1, int max_iter=100000); ~Solver_MCSVM_CS(); void Solve(double *w); private: void solve_sub_problem(double A_i, int yi, double C_yi, int active_i, double *alpha_new); bool be_shrunk(int i, int m, int yi, double alpha_i, double minG); double *B, *C, *G; int w_size, l; int nr_class; int max_iter; double eps; const problem *prob; }; Solver_MCSVM_CS::Solver_MCSVM_CS(const problem *prob, int nr_class, double *weighted_C, double eps, int max_iter) { this->w_size = prob->n; this->l = prob->l; this->nr_class = nr_class; this->eps = eps; this->max_iter = max_iter; this->prob = prob; this->B = new double[nr_class]; this->G = new double[nr_class]; this->C = weighted_C; } Solver_MCSVM_CS::~Solver_MCSVM_CS() { delete[] B; delete[] G; } int compare_double(const void *a, const void *b) { if(*(double *)a > *(double *)b) return -1; if(*(double *)a < *(double *)b) return 1; return 0; } void Solver_MCSVM_CS::solve_sub_problem(double A_i, int yi, double C_yi, int active_i, double *alpha_new) { int r; double *D; clone(D, B, active_i); if(yi < active_i) D[yi] += A_i*C_yi; qsort(D, active_i, sizeof(double), compare_double); double beta = D[0] - A_i*C_yi; for(r=1;ry[i] == m // alpha[i*nr_class+m] <= 0 if prob->y[i] != m // If initial alpha isn't zero, uncomment the for loop below to initialize w for(i=0;ix[i]; QD[i] = 0; while(xi->index != -1) { double val = xi->value; QD[i] += val*val; // Uncomment the for loop if initial alpha isn't zero // for(m=0; mindex-1)*nr_class+m] += alpha[i*nr_class+m]*val; xi++; } active_size_i[i] = nr_class; y_index[i] = (int)prob->y[i]; index[i] = i; } while(iter < max_iter) { double stopping = -INF; for(i=0;i 0) { for(m=0;mx[i]; while(xi->index!= -1) { double *w_i = &w[(xi->index-1)*nr_class]; for(m=0;mvalue); xi++; } double minG = INF; double maxG = -INF; for(m=0;m maxG) maxG = G[m]; } if(y_index[i] < active_size_i[i]) if(alpha_i[(int) prob->y[i]] < C[GETI(i)] && G[y_index[i]] < minG) minG = G[y_index[i]]; for(m=0;mm) { if(!be_shrunk(i, active_size_i[i], y_index[i], alpha_i[alpha_index_i[active_size_i[i]]], minG)) { swap(alpha_index_i[m], alpha_index_i[active_size_i[i]]); swap(G[m], G[active_size_i[i]]); if(y_index[i] == active_size_i[i]) y_index[i] = m; else if(y_index[i] == m) y_index[i] = active_size_i[i]; break; } active_size_i[i]--; } } } if(active_size_i[i] <= 1) { active_size--; swap(index[s], index[active_size]); s--; continue; } if(maxG-minG <= 1e-12) continue; else stopping = max(maxG - minG, stopping); for(m=0;m= 1e-12) { d_ind[nz_d] = alpha_index_i[m]; d_val[nz_d] = d; nz_d++; } } xi = prob->x[i]; while(xi->index != -1) { double *w_i = &w[(xi->index-1)*nr_class]; for(m=0;mvalue; xi++; } } } iter++; if(iter % 10 == 0) { info("."); } if(stopping < eps_shrink) { if(stopping < eps && start_from_all == true) break; else { active_size = l; for(i=0;i= max_iter) info("\nWARNING: reaching max number of iterations\n"); // calculate objective value double v = 0; int nSV = 0; for(i=0;i 0) nSV++; } for(i=0;iy[i]]; info("Objective value = %lf\n",v); info("nSV = %d\n",nSV); delete [] alpha; delete [] alpha_new; delete [] index; delete [] QD; delete [] d_ind; delete [] d_val; delete [] alpha_index; delete [] y_index; delete [] active_size_i; } // A coordinate descent algorithm for // L1-loss and L2-loss SVM dual problems // // min_\alpha 0.5(\alpha^T (Q + D)\alpha) - e^T \alpha, // s.t. 0 <= \alpha_i <= upper_bound_i, // // where Qij = yi yj xi^T xj and // D is a diagonal matrix // // In L1-SVM case: // upper_bound_i = Cp if y_i = 1 // upper_bound_i = Cn if y_i = -1 // D_ii = 0 // In L2-SVM case: // upper_bound_i = INF // D_ii = 1/(2*Cp) if y_i = 1 // D_ii = 1/(2*Cn) if y_i = -1 // // Given: // x, y, Cp, Cn // eps is the stopping tolerance // // solution will be put in w // // See Algorithm 3 of Hsieh et al., ICML 2008 #undef GETI #define GETI(i) (y[i]+1) // To support weights for instances, use GETI(i) (i) static void solve_l2r_l1l2_svc( const problem *prob, double *w, double eps, double Cp, double Cn, int solver_type) { int l = prob->l; int w_size = prob->n; int i, s, iter = 0; double C, d, G; double *QD = new double[l]; int max_iter = 1000; int *index = new int[l]; double *alpha = new double[l]; schar *y = new schar[l]; int active_size = l; // PG: projected gradient, for shrinking and stopping double PG; double PGmax_old = INF; double PGmin_old = -INF; double PGmax_new, PGmin_new; // default solver_type: L2R_L2LOSS_SVC_DUAL double diag[3] = {0.5/Cn, 0, 0.5/Cp}; double upper_bound[3] = {INF, 0, INF}; if(solver_type == L2R_L1LOSS_SVC_DUAL) { diag[0] = 0; diag[2] = 0; upper_bound[0] = Cn; upper_bound[2] = Cp; } for(i=0; iy[i] > 0) { y[i] = +1; } else { y[i] = -1; } } // Initial alpha can be set here. Note that // 0 <= alpha[i] <= upper_bound[GETI(i)] for(i=0; ix[i]; while (xi->index != -1) { double val = xi->value; QD[i] += val*val; w[xi->index-1] += y[i]*alpha[i]*val; xi++; } index[i] = i; } while (iter < max_iter) { PGmax_new = -INF; PGmin_new = INF; for (i=0; ix[i]; while(xi->index!= -1) { G += w[xi->index-1]*(xi->value); xi++; } G = G*yi-1; C = upper_bound[GETI(i)]; G += alpha[i]*diag[GETI(i)]; PG = 0; if (alpha[i] == 0) { if (G > PGmax_old) { active_size--; swap(index[s], index[active_size]); s--; continue; } else if (G < 0) PG = G; } else if (alpha[i] == C) { if (G < PGmin_old) { active_size--; swap(index[s], index[active_size]); s--; continue; } else if (G > 0) PG = G; } else PG = G; PGmax_new = max(PGmax_new, PG); PGmin_new = min(PGmin_new, PG); if(fabs(PG) > 1.0e-12) { double alpha_old = alpha[i]; alpha[i] = min(max(alpha[i] - G/QD[i], 0.0), C); d = (alpha[i] - alpha_old)*yi; xi = prob->x[i]; while (xi->index != -1) { w[xi->index-1] += d*xi->value; xi++; } } } iter++; if(iter % 10 == 0) info("."); if(PGmax_new - PGmin_new <= eps) { if(active_size == l) break; else { active_size = l; info("*"); PGmax_old = INF; PGmin_old = -INF; continue; } } PGmax_old = PGmax_new; PGmin_old = PGmin_new; if (PGmax_old <= 0) PGmax_old = INF; if (PGmin_old >= 0) PGmin_old = -INF; } info("\noptimization finished, #iter = %d\n",iter); if (iter >= max_iter) info("\nWARNING: reaching max number of iterations\nUsing -s 2 may be faster (also see FAQ)\n\n"); // calculate objective value double v = 0; int nSV = 0; for(i=0; i 0) ++nSV; } info("Objective value = %lf\n",v/2); info("nSV = %d\n",nSV); delete [] QD; delete [] alpha; delete [] y; delete [] index; } // A coordinate descent algorithm for // L1-loss and L2-loss epsilon-SVR dual problem // // min_\beta 0.5\beta^T (Q + diag(lambda)) \beta - p \sum_{i=1}^l|\beta_i| + \sum_{i=1}^l yi\beta_i, // s.t. -upper_bound_i <= \beta_i <= upper_bound_i, // // where Qij = xi^T xj and // D is a diagonal matrix // // In L1-SVM case: // upper_bound_i = C // lambda_i = 0 // In L2-SVM case: // upper_bound_i = INF // lambda_i = 1/(2*C) // // Given: // x, y, p, C // eps is the stopping tolerance // // solution will be put in w // // See Algorithm 4 of Ho and Lin, 2012 #undef GETI #define GETI(i) (0) // To support weights for instances, use GETI(i) (i) static void solve_l2r_l1l2_svr( const problem *prob, double *w, const parameter *param, int solver_type) { int l = prob->l; double C = param->C; double p = param->p; int w_size = prob->n; double eps = param->eps; int i, s, iter = 0; int max_iter = 1000; int active_size = l; int *index = new int[l]; double d, G, H; double Gmax_old = INF; double Gmax_new, Gnorm1_new; double Gnorm1_init = -1.0; // Gnorm1_init is initialized at the first iteration double *beta = new double[l]; double *QD = new double[l]; double *y = prob->y; // L2R_L2LOSS_SVR_DUAL double lambda[1], upper_bound[1]; lambda[0] = 0.5/C; upper_bound[0] = INF; if(solver_type == L2R_L1LOSS_SVR_DUAL) { lambda[0] = 0; upper_bound[0] = C; } // Initial beta can be set here. Note that // -upper_bound <= beta[i] <= upper_bound for(i=0; ix[i]; while(xi->index != -1) { double val = xi->value; QD[i] += val*val; w[xi->index-1] += beta[i]*val; xi++; } index[i] = i; } while(iter < max_iter) { Gmax_new = 0; Gnorm1_new = 0; for(i=0; ix[i]; while(xi->index != -1) { int ind = xi->index-1; double val = xi->value; G += val*w[ind]; xi++; } double Gp = G+p; double Gn = G-p; double violation = 0; if(beta[i] == 0) { if(Gp < 0) violation = -Gp; else if(Gn > 0) violation = Gn; else if(Gp>Gmax_old && Gn<-Gmax_old) { active_size--; swap(index[s], index[active_size]); s--; continue; } } else if(beta[i] >= upper_bound[GETI(i)]) { if(Gp > 0) violation = Gp; else if(Gp < -Gmax_old) { active_size--; swap(index[s], index[active_size]); s--; continue; } } else if(beta[i] <= -upper_bound[GETI(i)]) { if(Gn < 0) violation = -Gn; else if(Gn > Gmax_old) { active_size--; swap(index[s], index[active_size]); s--; continue; } } else if(beta[i] > 0) violation = fabs(Gp); else violation = fabs(Gn); Gmax_new = max(Gmax_new, violation); Gnorm1_new += violation; // obtain Newton direction d if(Gp < H*beta[i]) d = -Gp/H; else if(Gn > H*beta[i]) d = -Gn/H; else d = -beta[i]; if(fabs(d) < 1.0e-12) continue; double beta_old = beta[i]; beta[i] = min(max(beta[i]+d, -upper_bound[GETI(i)]), upper_bound[GETI(i)]); d = beta[i]-beta_old; if(d != 0) { xi = prob->x[i]; while(xi->index != -1) { w[xi->index-1] += d*xi->value; xi++; } } } if(iter == 0) Gnorm1_init = Gnorm1_new; iter++; if(iter % 10 == 0) info("."); if(Gnorm1_new <= eps*Gnorm1_init) { if(active_size == l) break; else { active_size = l; info("*"); Gmax_old = INF; continue; } } Gmax_old = Gmax_new; } info("\noptimization finished, #iter = %d\n", iter); if(iter >= max_iter) info("\nWARNING: reaching max number of iterations\nUsing -s 11 may be faster\n\n"); // calculate objective value double v = 0; int nSV = 0; for(i=0; il; int w_size = prob->n; int i, s, iter = 0; double *xTx = new double[l]; int max_iter = 1000; int *index = new int[l]; double *alpha = new double[2*l]; // store alpha and C - alpha schar *y = new schar[l]; int max_inner_iter = 100; // for inner Newton double innereps = 1e-2; double innereps_min = min(1e-8, eps); double upper_bound[3] = {Cn, 0, Cp}; for(i=0; iy[i] > 0) { y[i] = +1; } else { y[i] = -1; } } // Initial alpha can be set here. Note that // 0 < alpha[i] < upper_bound[GETI(i)] // alpha[2*i] + alpha[2*i+1] = upper_bound[GETI(i)] for(i=0; ix[i]; while (xi->index != -1) { double val = xi->value; xTx[i] += val*val; w[xi->index-1] += y[i]*alpha[2*i]*val; xi++; } index[i] = i; } while (iter < max_iter) { for (i=0; ix[i]; while (xi->index != -1) { ywTx += w[xi->index-1]*xi->value; xi++; } ywTx *= y[i]; double a = xisq, b = ywTx; // Decide to minimize g_1(z) or g_2(z) int ind1 = 2*i, ind2 = 2*i+1, sign = 1; if(0.5*a*(alpha[ind2]-alpha[ind1])+b < 0) { ind1 = 2*i+1; ind2 = 2*i; sign = -1; } // g_t(z) = z*log(z) + (C-z)*log(C-z) + 0.5a(z-alpha_old)^2 + sign*b(z-alpha_old) double alpha_old = alpha[ind1]; double z = alpha_old; if(C - z < 0.5 * C) z = 0.1*z; double gp = a*(z-alpha_old)+sign*b+log(z/(C-z)); Gmax = max(Gmax, fabs(gp)); // Newton method on the sub-problem const double eta = 0.1; // xi in the paper int inner_iter = 0; while (inner_iter <= max_inner_iter) { if(fabs(gp) < innereps) break; double gpp = a + C/(C-z)/z; double tmpz = z - gp/gpp; if(tmpz <= 0) z *= eta; else // tmpz in (0, C) z = tmpz; gp = a*(z-alpha_old)+sign*b+log(z/(C-z)); newton_iter++; inner_iter++; } if(inner_iter > 0) // update w { alpha[ind1] = z; alpha[ind2] = C-z; xi = prob->x[i]; while (xi->index != -1) { w[xi->index-1] += sign*(z-alpha_old)*yi*xi->value; xi++; } } } iter++; if(iter % 10 == 0) info("."); if(Gmax < eps) break; if(newton_iter <= l/10) innereps = max(innereps_min, 0.1*innereps); } info("\noptimization finished, #iter = %d\n",iter); if (iter >= max_iter) info("\nWARNING: reaching max number of iterations\nUsing -s 0 may be faster (also see FAQ)\n\n"); // calculate objective value double v = 0; for(i=0; il; int w_size = prob_col->n; int j, s, iter = 0; int max_iter = 1000; int active_size = w_size; int max_num_linesearch = 20; double sigma = 0.01; double d, G_loss, G, H; double Gmax_old = INF; double Gmax_new, Gnorm1_new; double Gnorm1_init = -1.0; // Gnorm1_init is initialized at the first iteration double d_old, d_diff; double loss_old, loss_new; double appxcond, cond; int *index = new int[w_size]; schar *y = new schar[l]; double *b = new double[l]; // b = 1-ywTx double *xj_sq = new double[w_size]; feature_node *x; double C[3] = {Cn,0,Cp}; // Initial w can be set here. for(j=0; jy[j] > 0) y[j] = 1; else y[j] = -1; } for(j=0; jx[j]; while(x->index != -1) { int ind = x->index-1; x->value *= y[ind]; // x->value stores yi*xij double val = x->value; b[ind] -= w[j]*val; xj_sq[j] += C[GETI(ind)]*val*val; x++; } } while(iter < max_iter) { Gmax_new = 0; Gnorm1_new = 0; for(j=0; jx[j]; while(x->index != -1) { int ind = x->index-1; if(b[ind] > 0) { double val = x->value; double tmp = C[GETI(ind)]*val; G_loss -= tmp*b[ind]; H += tmp*val; } x++; } G_loss *= 2; G = G_loss; H *= 2; H = max(H, 1e-12); double Gp = G+1; double Gn = G-1; double violation = 0; if(w[j] == 0) { if(Gp < 0) violation = -Gp; else if(Gn > 0) violation = Gn; else if(Gp>Gmax_old/l && Gn<-Gmax_old/l) { active_size--; swap(index[s], index[active_size]); s--; continue; } } else if(w[j] > 0) violation = fabs(Gp); else violation = fabs(Gn); Gmax_new = max(Gmax_new, violation); Gnorm1_new += violation; // obtain Newton direction d if(Gp < H*w[j]) d = -Gp/H; else if(Gn > H*w[j]) d = -Gn/H; else d = -w[j]; if(fabs(d) < 1.0e-12) continue; double delta = fabs(w[j]+d)-fabs(w[j]) + G*d; d_old = 0; int num_linesearch; for(num_linesearch=0; num_linesearch < max_num_linesearch; num_linesearch++) { d_diff = d_old - d; cond = fabs(w[j]+d)-fabs(w[j]) - sigma*delta; appxcond = xj_sq[j]*d*d + G_loss*d + cond; if(appxcond <= 0) { x = prob_col->x[j]; while(x->index != -1) { b[x->index-1] += d_diff*x->value; x++; } break; } if(num_linesearch == 0) { loss_old = 0; loss_new = 0; x = prob_col->x[j]; while(x->index != -1) { int ind = x->index-1; if(b[ind] > 0) loss_old += C[GETI(ind)]*b[ind]*b[ind]; double b_new = b[ind] + d_diff*x->value; b[ind] = b_new; if(b_new > 0) loss_new += C[GETI(ind)]*b_new*b_new; x++; } } else { loss_new = 0; x = prob_col->x[j]; while(x->index != -1) { int ind = x->index-1; double b_new = b[ind] + d_diff*x->value; b[ind] = b_new; if(b_new > 0) loss_new += C[GETI(ind)]*b_new*b_new; x++; } } cond = cond + loss_new - loss_old; if(cond <= 0) break; else { d_old = d; d *= 0.5; delta *= 0.5; } } w[j] += d; // recompute b[] if line search takes too many steps if(num_linesearch >= max_num_linesearch) { info("#"); for(int i=0; ix[i]; while(x->index != -1) { b[x->index-1] -= w[i]*x->value; x++; } } } } if(iter == 0) Gnorm1_init = Gnorm1_new; iter++; if(iter % 10 == 0) info("."); if(Gnorm1_new <= eps*Gnorm1_init) { if(active_size == w_size) break; else { active_size = w_size; info("*"); Gmax_old = INF; continue; } } Gmax_old = Gmax_new; } info("\noptimization finished, #iter = %d\n", iter); if(iter >= max_iter) info("\nWARNING: reaching max number of iterations\n"); // calculate objective value double v = 0; int nnz = 0; for(j=0; jx[j]; while(x->index != -1) { x->value *= prob_col->y[x->index-1]; // restore x->value x++; } if(w[j] != 0) { v += fabs(w[j]); nnz++; } } for(j=0; j 0) v += C[GETI(j)]*b[j]*b[j]; info("Objective value = %lf\n", v); info("#nonzeros/#features = %d/%d\n", nnz, w_size); delete [] index; delete [] y; delete [] b; delete [] xj_sq; } // A coordinate descent algorithm for // L1-regularized logistic regression problems // // min_w \sum |wj| + C \sum log(1+exp(-yi w^T xi)), // // Given: // x, y, Cp, Cn // eps is the stopping tolerance // // solution will be put in w // // See Yuan et al. (2011) and appendix of LIBLINEAR paper, Fan et al. (2008) #undef GETI #define GETI(i) (y[i]+1) // To support weights for instances, use GETI(i) (i) static void solve_l1r_lr( const problem *prob_col, double *w, double eps, double Cp, double Cn) { int l = prob_col->l; int w_size = prob_col->n; int j, s, newton_iter=0, iter=0; int max_newton_iter = 100; int max_iter = 1000; int max_num_linesearch = 20; int active_size; int QP_active_size; double nu = 1e-12; double inner_eps = 1; double sigma = 0.01; double w_norm, w_norm_new; double z, G, H; double Gnorm1_init = -1.0; // Gnorm1_init is initialized at the first iteration double Gmax_old = INF; double Gmax_new, Gnorm1_new; double QP_Gmax_old = INF; double QP_Gmax_new, QP_Gnorm1_new; double delta, negsum_xTd, cond; int *index = new int[w_size]; schar *y = new schar[l]; double *Hdiag = new double[w_size]; double *Grad = new double[w_size]; double *wpd = new double[w_size]; double *xjneg_sum = new double[w_size]; double *xTd = new double[l]; double *exp_wTx = new double[l]; double *exp_wTx_new = new double[l]; double *tau = new double[l]; double *D = new double[l]; feature_node *x; double C[3] = {Cn,0,Cp}; // Initial w can be set here. for(j=0; jy[j] > 0) y[j] = 1; else y[j] = -1; exp_wTx[j] = 0; } w_norm = 0; for(j=0; jx[j]; while(x->index != -1) { int ind = x->index-1; double val = x->value; exp_wTx[ind] += w[j]*val; if(y[ind] == -1) xjneg_sum[j] += C[GETI(ind)]*val; x++; } } for(j=0; jx[j]; while(x->index != -1) { int ind = x->index-1; Hdiag[j] += x->value*x->value*D[ind]; tmp += x->value*tau[ind]; x++; } Grad[j] = -tmp + xjneg_sum[j]; double Gp = Grad[j]+1; double Gn = Grad[j]-1; double violation = 0; if(w[j] == 0) { if(Gp < 0) violation = -Gp; else if(Gn > 0) violation = Gn; //outer-level shrinking else if(Gp>Gmax_old/l && Gn<-Gmax_old/l) { active_size--; swap(index[s], index[active_size]); s--; continue; } } else if(w[j] > 0) violation = fabs(Gp); else violation = fabs(Gn); Gmax_new = max(Gmax_new, violation); Gnorm1_new += violation; } if(newton_iter == 0) Gnorm1_init = Gnorm1_new; if(Gnorm1_new <= eps*Gnorm1_init) break; iter = 0; QP_Gmax_old = INF; QP_active_size = active_size; for(int i=0; ix[j]; G = Grad[j] + (wpd[j]-w[j])*nu; while(x->index != -1) { int ind = x->index-1; G += x->value*D[ind]*xTd[ind]; x++; } double Gp = G+1; double Gn = G-1; double violation = 0; if(wpd[j] == 0) { if(Gp < 0) violation = -Gp; else if(Gn > 0) violation = Gn; //inner-level shrinking else if(Gp>QP_Gmax_old/l && Gn<-QP_Gmax_old/l) { QP_active_size--; swap(index[s], index[QP_active_size]); s--; continue; } } else if(wpd[j] > 0) violation = fabs(Gp); else violation = fabs(Gn); QP_Gmax_new = max(QP_Gmax_new, violation); QP_Gnorm1_new += violation; // obtain solution of one-variable problem if(Gp < H*wpd[j]) z = -Gp/H; else if(Gn > H*wpd[j]) z = -Gn/H; else z = -wpd[j]; if(fabs(z) < 1.0e-12) continue; z = min(max(z,-10.0),10.0); wpd[j] += z; x = prob_col->x[j]; while(x->index != -1) { int ind = x->index-1; xTd[ind] += x->value*z; x++; } } iter++; if(QP_Gnorm1_new <= inner_eps*Gnorm1_init) { //inner stopping if(QP_active_size == active_size) break; //active set reactivation else { QP_active_size = active_size; QP_Gmax_old = INF; continue; } } QP_Gmax_old = QP_Gmax_new; } if(iter >= max_iter) info("WARNING: reaching max number of inner iterations\n"); delta = 0; w_norm_new = 0; for(j=0; j= max_num_linesearch) { for(int i=0; ix[i]; while(x->index != -1) { exp_wTx[x->index-1] += w[i]*x->value; x++; } } for(int i=0; i= max_newton_iter) info("WARNING: reaching max number of iterations\n"); // calculate objective value double v = 0; int nnz = 0; for(j=0; jl; int n = prob->n; size_t nnz = 0; size_t *col_ptr = new size_t [n+1]; feature_node *x_space; prob_col->l = l; prob_col->n = n; prob_col->y = new double[l]; prob_col->x = new feature_node*[n]; for(i=0; iy[i] = prob->y[i]; for(i=0; ix[i]; while(x->index != -1) { nnz++; col_ptr[x->index]++; x++; } } for(i=1; ix[i] = &x_space[col_ptr[i]]; for(i=0; ix[i]; while(x->index != -1) { int ind = x->index-1; x_space[col_ptr[ind]].index = i+1; // starts from 1 x_space[col_ptr[ind]].value = x->value; col_ptr[ind]++; x++; } } for(i=0; il; int max_nr_class = 16; int nr_class = 0; int *label = Malloc(int,max_nr_class); int *count = Malloc(int,max_nr_class); int *data_label = Malloc(int,l); int i; for(i=0;iy[i]; int j; for(j=0;jeps; int pos = 0; int neg = 0; for(int i=0;il;i++) if(prob->y[i] > 0) pos++; neg = prob->l - pos; double primal_solver_tol = eps*max(min(pos,neg), 1)/prob->l; function *fun_obj=NULL; switch(param->solver_type) { case L2R_LR: { double *C = new double[prob->l]; for(int i = 0; i < prob->l; i++) { if(prob->y[i] > 0) C[i] = Cp; else C[i] = Cn; } fun_obj=new l2r_lr_fun(prob, C); TRON tron_obj(fun_obj, primal_solver_tol); tron_obj.set_print_string(liblinear_print_string); tron_obj.tron(w); delete fun_obj; delete[] C; break; } case L2R_L2LOSS_SVC: { double *C = new double[prob->l]; for(int i = 0; i < prob->l; i++) { if(prob->y[i] > 0) C[i] = Cp; else C[i] = Cn; } fun_obj=new l2r_l2_svc_fun(prob, C); TRON tron_obj(fun_obj, primal_solver_tol); tron_obj.set_print_string(liblinear_print_string); tron_obj.tron(w); delete fun_obj; delete[] C; break; } case L2R_L2LOSS_SVC_DUAL: solve_l2r_l1l2_svc(prob, w, eps, Cp, Cn, L2R_L2LOSS_SVC_DUAL); break; case L2R_L1LOSS_SVC_DUAL: solve_l2r_l1l2_svc(prob, w, eps, Cp, Cn, L2R_L1LOSS_SVC_DUAL); break; case L1R_L2LOSS_SVC: { problem prob_col; feature_node *x_space = NULL; transpose(prob, &x_space ,&prob_col); solve_l1r_l2_svc(&prob_col, w, primal_solver_tol, Cp, Cn); delete [] prob_col.y; delete [] prob_col.x; delete [] x_space; break; } case L1R_LR: { problem prob_col; feature_node *x_space = NULL; transpose(prob, &x_space ,&prob_col); solve_l1r_lr(&prob_col, w, primal_solver_tol, Cp, Cn); delete [] prob_col.y; delete [] prob_col.x; delete [] x_space; break; } case L2R_LR_DUAL: solve_l2r_lr_dual(prob, w, eps, Cp, Cn); break; case L2R_L2LOSS_SVR: { double *C = new double[prob->l]; for(int i = 0; i < prob->l; i++) C[i] = param->C; fun_obj=new l2r_l2_svr_fun(prob, C, param->p); TRON tron_obj(fun_obj, param->eps); tron_obj.set_print_string(liblinear_print_string); tron_obj.tron(w); delete fun_obj; delete[] C; break; } case L2R_L1LOSS_SVR_DUAL: solve_l2r_l1l2_svr(prob, w, param, L2R_L1LOSS_SVR_DUAL); break; case L2R_L2LOSS_SVR_DUAL: solve_l2r_l1l2_svr(prob, w, param, L2R_L2LOSS_SVR_DUAL); break; default: fprintf(stderr, "ERROR: unknown solver_type\n"); break; } } // // Interface functions // model* train(const problem *prob, const parameter *param) { int i,j; int l = prob->l; int n = prob->n; int w_size = prob->n; model *model_ = Malloc(model,1); if(prob->bias>=0) model_->nr_feature=n-1; else model_->nr_feature=n; model_->param = *param; model_->bias = prob->bias; if(check_regression_model(model_)) { model_->w = Malloc(double, w_size); model_->nr_class = 2; model_->label = NULL; train_one(prob, param, &model_->w[0], 0, 0); } else { int nr_class; int *label = NULL; int *start = NULL; int *count = NULL; int *perm = Malloc(int,l); // group training data of the same class group_classes(prob,&nr_class,&label,&start,&count,perm); model_->nr_class=nr_class; model_->label = Malloc(int,nr_class); for(i=0;ilabel[i] = label[i]; // calculate weighted C double *weighted_C = Malloc(double, nr_class); for(i=0;iC; for(i=0;inr_weight;i++) { for(j=0;jweight_label[i] == label[j]) break; if(j == nr_class) fprintf(stderr,"WARNING: class label %d specified in weight is not found\n", param->weight_label[i]); else weighted_C[j] *= param->weight[i]; } // constructing the subproblem feature_node **x = Malloc(feature_node *,l); for(i=0;ix[perm[i]]; int k; problem sub_prob; sub_prob.l = l; sub_prob.n = n; sub_prob.x = Malloc(feature_node *,sub_prob.l); sub_prob.y = Malloc(double,sub_prob.l); for(k=0; ksolver_type == MCSVM_CS) { model_->w=Malloc(double, n*nr_class); for(i=0;ieps); Solver.Solve(model_->w); } else { if(nr_class == 2) { model_->w=Malloc(double, w_size); int e0 = start[0]+count[0]; k=0; for(; kw[0], weighted_C[0], weighted_C[1]); } else { model_->w=Malloc(double, w_size*nr_class); double *w=Malloc(double, w_size); for(i=0;iC); for(int j=0;jw[j*nr_class+i] = w[j]; } free(w); } } free(x); free(label); free(start); free(count); free(perm); free(sub_prob.x); free(sub_prob.y); free(weighted_C); } return model_; } void cross_validation(const problem *prob, const parameter *param, int nr_fold, double *target) { int i; int *fold_start; int l = prob->l; int *perm = Malloc(int,l); if (nr_fold > l) { nr_fold = l; fprintf(stderr,"WARNING: # folds > # data. Will use # folds = # data instead (i.e., leave-one-out cross validation)\n"); } fold_start = Malloc(int,nr_fold+1); for(i=0;ibias; subprob.n = prob->n; subprob.l = l-(end-begin); subprob.x = Malloc(struct feature_node*,subprob.l); subprob.y = Malloc(double,subprob.l); k=0; for(j=0;jx[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } for(j=end;jx[perm[j]]; subprob.y[k] = prob->y[perm[j]]; ++k; } struct model *submodel = train(&subprob,param); for(j=begin;jx[perm[j]]); free_and_destroy_model(&submodel); free(subprob.x); free(subprob.y); } free(fold_start); free(perm); } double predict_values(const struct model *model_, const struct feature_node *x, double *dec_values) { int idx; int n; if(model_->bias>=0) n=model_->nr_feature+1; else n=model_->nr_feature; double *w=model_->w; int nr_class=model_->nr_class; int i; int nr_w; if(nr_class==2 && model_->param.solver_type != MCSVM_CS) nr_w = 1; else nr_w = nr_class; const feature_node *lx=x; for(i=0;iindex)!=-1; lx++) { // the dimension of testing data may exceed that of training if(idx<=n) for(i=0;ivalue; } if(nr_class==2) { if(check_regression_model(model_)) return dec_values[0]; else return (dec_values[0]>0)?model_->label[0]:model_->label[1]; } else { int dec_max_idx = 0; for(i=1;i dec_values[dec_max_idx]) dec_max_idx = i; } return model_->label[dec_max_idx]; } } double predict(const model *model_, const feature_node *x) { double *dec_values = Malloc(double, model_->nr_class); double label=predict_values(model_, x, dec_values); free(dec_values); return label; } double predict_probability(const struct model *model_, const struct feature_node *x, double* prob_estimates) { if(check_probability_model(model_)) { int i; int nr_class=model_->nr_class; int nr_w; if(nr_class==2) nr_w = 1; else nr_w = nr_class; double label=predict_values(model_, x, prob_estimates); for(i=0;inr_feature; int n; const parameter& param = model_->param; if(model_->bias>=0) n=nr_feature+1; else n=nr_feature; int w_size = n; FILE *fp = fopen(model_file_name,"w"); if(fp==NULL) return -1; char *old_locale = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); int nr_w; if(model_->nr_class==2 && model_->param.solver_type != MCSVM_CS) nr_w=1; else nr_w=model_->nr_class; fprintf(fp, "solver_type %s\n", solver_type_table[param.solver_type]); fprintf(fp, "nr_class %d\n", model_->nr_class); if(model_->label) { fprintf(fp, "label"); for(i=0; inr_class; i++) fprintf(fp, " %d", model_->label[i]); fprintf(fp, "\n"); } fprintf(fp, "nr_feature %d\n", nr_feature); fprintf(fp, "bias %.16g\n", model_->bias); fprintf(fp, "w\n"); for(i=0; iw[i*nr_w+j]); fprintf(fp, "\n"); } setlocale(LC_ALL, old_locale); free(old_locale); if (ferror(fp) != 0 || fclose(fp) != 0) return -1; else return 0; } struct model *load_model(const char *model_file_name) { FILE *fp = fopen(model_file_name,"r"); if(fp==NULL) return NULL; int i; int nr_feature; int n; int nr_class; double bias; model *model_ = Malloc(model,1); parameter& param = model_->param; model_->label = NULL; char *old_locale = strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); char cmd[81]; while(1) { fscanf(fp,"%80s",cmd); if(strcmp(cmd,"solver_type")==0) { fscanf(fp,"%80s",cmd); int i; for(i=0;solver_type_table[i];i++) { if(strcmp(solver_type_table[i],cmd)==0) { param.solver_type=i; break; } } if(solver_type_table[i] == NULL) { fprintf(stderr,"unknown solver type.\n"); setlocale(LC_ALL, old_locale); free(model_->label); free(model_); free(old_locale); return NULL; } } else if(strcmp(cmd,"nr_class")==0) { fscanf(fp,"%d",&nr_class); model_->nr_class=nr_class; } else if(strcmp(cmd,"nr_feature")==0) { fscanf(fp,"%d",&nr_feature); model_->nr_feature=nr_feature; } else if(strcmp(cmd,"bias")==0) { fscanf(fp,"%lf",&bias); model_->bias=bias; } else if(strcmp(cmd,"w")==0) { break; } else if(strcmp(cmd,"label")==0) { int nr_class = model_->nr_class; model_->label = Malloc(int,nr_class); for(int i=0;ilabel[i]); } else { fprintf(stderr,"unknown text in model file: [%s]\n",cmd); setlocale(LC_ALL, old_locale); free(model_->label); free(model_); free(old_locale); return NULL; } } nr_feature=model_->nr_feature; if(model_->bias>=0) n=nr_feature+1; else n=nr_feature; int w_size = n; int nr_w; if(nr_class==2 && param.solver_type != MCSVM_CS) nr_w = 1; else nr_w = nr_class; model_->w=Malloc(double, w_size*nr_w); for(i=0; iw[i*nr_w+j]); fscanf(fp, "\n"); } setlocale(LC_ALL, old_locale); free(old_locale); if (ferror(fp) != 0 || fclose(fp) != 0) return NULL; return model_; } int get_nr_feature(const model *model_) { return model_->nr_feature; } int get_nr_class(const model *model_) { return model_->nr_class; } void get_labels(const model *model_, int* label) { if (model_->label != NULL) for(int i=0;inr_class;i++) label[i] = model_->label[i]; } // use inline here for better performance (around 20% faster than the non-inline one) static inline double get_w_value(const struct model *model_, int idx, int label_idx) { int nr_class = model_->nr_class; int solver_type = model_->param.solver_type; const double *w = model_->w; if(idx < 0 || idx > model_->nr_feature) return 0; if(check_regression_model(model_)) return w[idx]; else { if(label_idx < 0 || label_idx >= nr_class) return 0; if(nr_class == 2 && solver_type != MCSVM_CS) { if(label_idx == 0) return w[idx]; else return -w[idx]; } else return w[idx*nr_class+label_idx]; } } // feat_idx: starting from 1 to nr_feature // label_idx: starting from 0 to nr_class-1 for classification models; // for regression models, label_idx is ignored. double get_decfun_coef(const struct model *model_, int feat_idx, int label_idx) { if(feat_idx > model_->nr_feature) return 0; return get_w_value(model_, feat_idx-1, label_idx); } double get_decfun_bias(const struct model *model_, int label_idx) { int bias_idx = model_->nr_feature; double bias = model_->bias; if(bias <= 0) return 0; else return bias*get_w_value(model_, bias_idx, label_idx); } void free_model_content(struct model *model_ptr) { if(model_ptr->w != NULL) free(model_ptr->w); if(model_ptr->label != NULL) free(model_ptr->label); } void free_and_destroy_model(struct model **model_ptr_ptr) { struct model *model_ptr = *model_ptr_ptr; if(model_ptr != NULL) { free_model_content(model_ptr); free(model_ptr); } } void destroy_param(parameter* param) { if(param->weight_label != NULL) free(param->weight_label); if(param->weight != NULL) free(param->weight); } const char *check_parameter(const problem *prob, const parameter *param) { if(param->eps <= 0) return "eps <= 0"; if(param->C <= 0) return "C <= 0"; if(param->p < 0) return "p < 0"; if(param->solver_type != L2R_LR && param->solver_type != L2R_L2LOSS_SVC_DUAL && param->solver_type != L2R_L2LOSS_SVC && param->solver_type != L2R_L1LOSS_SVC_DUAL && param->solver_type != MCSVM_CS && param->solver_type != L1R_L2LOSS_SVC && param->solver_type != L1R_LR && param->solver_type != L2R_LR_DUAL && param->solver_type != L2R_L2LOSS_SVR && param->solver_type != L2R_L2LOSS_SVR_DUAL && param->solver_type != L2R_L1LOSS_SVR_DUAL) return "unknown solver type"; return NULL; } int check_probability_model(const struct model *model_) { return (model_->param.solver_type==L2R_LR || model_->param.solver_type==L2R_LR_DUAL || model_->param.solver_type==L1R_LR); } int check_regression_model(const struct model *model_) { return (model_->param.solver_type==L2R_L2LOSS_SVR || model_->param.solver_type==L2R_L1LOSS_SVR_DUAL || model_->param.solver_type==L2R_L2LOSS_SVR_DUAL); } void set_print_string_function(void (*print_func)(const char*)) { if (print_func == NULL) liblinear_print_string = &print_string_stdout; else liblinear_print_string = print_func; } ================================================ FILE: Matlab/liblinear-1.96/linear.def ================================================ LIBRARY liblinear EXPORTS train @1 cross_validation @2 save_model @3 load_model @4 get_nr_feature @5 get_nr_class @6 get_labels @7 predict_values @8 predict @9 predict_probability @10 free_and_destroy_model @11 free_model_content @12 destroy_param @13 check_parameter @14 check_probability_model @15 set_print_string_function @16 get_decfun_coef @17 get_decfun_bias @18 check_regression_model @19 ================================================ FILE: Matlab/liblinear-1.96/linear.h ================================================ #ifndef _LIBLINEAR_H #define _LIBLINEAR_H #ifdef __cplusplus extern "C" { #endif struct feature_node { int index; double value; }; struct problem { int l, n; double *y; struct feature_node **x; double bias; /* < 0 if no bias term */ }; enum { L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR, L2R_LR_DUAL, L2R_L2LOSS_SVR = 11, L2R_L2LOSS_SVR_DUAL, L2R_L1LOSS_SVR_DUAL }; /* solver_type */ struct parameter { int solver_type; /* these are for training only */ double eps; /* stopping criteria */ double C; int nr_weight; int *weight_label; double* weight; double p; }; struct model { struct parameter param; int nr_class; /* number of classes */ int nr_feature; double *w; int *label; /* label of each class */ double bias; }; struct model* train(const struct problem *prob, const struct parameter *param); void cross_validation(const struct problem *prob, const struct parameter *param, int nr_fold, double *target); double predict_values(const struct model *model_, const struct feature_node *x, double* dec_values); double predict(const struct model *model_, const struct feature_node *x); double predict_probability(const struct model *model_, const struct feature_node *x, double* prob_estimates); int save_model(const char *model_file_name, const struct model *model_); struct model *load_model(const char *model_file_name); int get_nr_feature(const struct model *model_); int get_nr_class(const struct model *model_); void get_labels(const struct model *model_, int* label); double get_decfun_coef(const struct model *model_, int feat_idx, int label_idx); double get_decfun_bias(const struct model *model_, int label_idx); void free_model_content(struct model *model_ptr); void free_and_destroy_model(struct model **model_ptr_ptr); void destroy_param(struct parameter *param); const char *check_parameter(const struct problem *prob, const struct parameter *param); int check_probability_model(const struct model *model); int check_regression_model(const struct model *model); void set_print_string_function(void (*print_func) (const char*)); #ifdef __cplusplus } #endif #endif /* _LIBLINEAR_H */ ================================================ FILE: Matlab/liblinear-1.96/matlab/Makefile ================================================ # This Makefile is used under Linux MATLABDIR ?= /usr/local/matlab CXX ?= g++ #CXX = g++-3.3 CC ?= gcc CFLAGS = -Wall -Wconversion -O3 -fPIC -I$(MATLABDIR)/extern/include -I.. MEX = $(MATLABDIR)/bin/mex MEX_OPTION = CC="$(CXX)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" # comment the following line if you use MATLAB on a 32-bit computer MEX_OPTION += -largeArrayDims MEX_EXT = $(shell $(MATLABDIR)/bin/mexext) all: matlab matlab: binary octave: @echo "please type make under Octave" binary: train.$(MEX_EXT) predict.$(MEX_EXT) libsvmread.$(MEX_EXT) libsvmwrite.$(MEX_EXT) train.$(MEX_EXT): train.c ../linear.h ../tron.o ../linear.o linear_model_matlab.o ../blas/blas.a $(MEX) $(MEX_OPTION) train.c ../tron.o ../linear.o linear_model_matlab.o ../blas/blas.a predict.$(MEX_EXT): predict.c ../linear.h ../tron.o ../linear.o linear_model_matlab.o ../blas/blas.a $(MEX) $(MEX_OPTION) predict.c ../tron.o ../linear.o linear_model_matlab.o ../blas/blas.a libsvmread.$(MEX_EXT): libsvmread.c $(MEX) $(MEX_OPTION) libsvmread.c libsvmwrite.$(MEX_EXT): libsvmwrite.c $(MEX) $(MEX_OPTION) libsvmwrite.c linear_model_matlab.o: linear_model_matlab.c ../linear.h $(CXX) $(CFLAGS) -c linear_model_matlab.c ../linear.o: ../linear.cpp ../linear.h make -C .. linear.o ../tron.o: ../tron.cpp ../tron.h make -C .. tron.o ../blas/blas.a: ../blas/*.c ../blas/*.h make -C ../blas OPTFLAGS='$(CFLAGS)' CC='$(CC)'; clean: make -C ../blas clean rm -f *~ *.o *.mex* *.obj ../linear.o ../tron.o ================================================ FILE: Matlab/liblinear-1.96/matlab/README ================================================ -------------------------------------------- --- MATLAB/OCTAVE interface of LIBLINEAR --- -------------------------------------------- Table of Contents ================= - Introduction - Installation - Usage - Returned Model Structure - Other Utilities - Examples - Additional Information Introduction ============ This tool provides a simple interface to LIBLINEAR, a library for large-scale regularized linear classification and regression (http://www.csie.ntu.edu.tw/~cjlin/liblinear). It is very easy to use as the usage and the way of specifying parameters are the same as that of LIBLINEAR. Installation ============ On Windows systems, pre-built binary files are already in the directory '..\windows', so no need to conduct installation. Now we provide binary files only for 64bit MATLAB on Windows. If you would like to re-build the package, please rely on the following steps. We recommend using make.m on both MATLAB and OCTAVE. Just type 'make' to build 'libsvmread.mex', 'libsvmwrite.mex', 'train.mex', and 'predict.mex'. On MATLAB or Octave: >> make If make.m does not work on MATLAB (especially for Windows), try 'mex -setup' to choose a suitable compiler for mex. Make sure your compiler is accessible and workable. Then type 'make' to start the installation. Example: matlab>> mex -setup (ps: MATLAB will show the following messages to setup default compiler.) Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio [0] None Compiler: 1 Please verify your choices: Compiler: Microsoft Visual C/C++ 7.1 Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y matlab>> make On Unix systems, if neither make.m nor 'mex -setup' works, please use Makefile and type 'make' in a command window. Note that we assume your MATLAB is installed in '/usr/local/matlab'. If not, please change MATLABDIR in Makefile. Example: linux> make To use octave, type 'make octave': Example: linux> make octave For a list of supported/compatible compilers for MATLAB, please check the following page: http://www.mathworks.com/support/compilers/current_release/ Usage ===== matlab> model = train(training_label_vector, training_instance_matrix [,'liblinear_options', 'col']); -training_label_vector: An m by 1 vector of training labels. (type must be double) -training_instance_matrix: An m by n matrix of m training instances with n features. It must be a sparse matrix. (type must be double) -liblinear_options: A string of training options in the same format as that of LIBLINEAR. -col: if 'col' is set, each column of training_instance_matrix is a data instance. Otherwise each row is a data instance. matlab> [predicted_label, accuracy, decision_values/prob_estimates] = predict(testing_label_vector, testing_instance_matrix, model [, 'liblinear_options', 'col']); matlab> [predicted_label] = predict(testing_label_vector, testing_instance_matrix, model [, 'liblinear_options', 'col']); -testing_label_vector: An m by 1 vector of prediction labels. If labels of test data are unknown, simply use any random values. (type must be double) -testing_instance_matrix: An m by n matrix of m testing instances with n features. It must be a sparse matrix. (type must be double) -model: The output of train. -liblinear_options: A string of testing options in the same format as that of LIBLINEAR. -col: if 'col' is set, each column of testing_instance_matrix is a data instance. Otherwise each row is a data instance. Returned Model Structure ======================== The 'train' function returns a model which can be used for future prediction. It is a structure and is organized as [Parameters, nr_class, nr_feature, bias, Label, w]: -Parameters: Parameters -nr_class: number of classes; = 2 for regression -nr_feature: number of features in training data (without including the bias term) -bias: If >= 0, we assume one additional feature is added to the end of each data instance. -Label: label of each class; empty for regression -w: a nr_w-by-n matrix for the weights, where n is nr_feature or nr_feature+1 depending on the existence of the bias term. nr_w is 1 if nr_class=2 and -s is not 4 (i.e., not multi-class svm by Crammer and Singer). It is nr_class otherwise. If the '-v' option is specified, cross validation is conducted and the returned model is just a scalar: cross-validation accuracy for classification and mean-squared error for regression. Result of Prediction ==================== The function 'predict' has three outputs. The first one, predicted_label, is a vector of predicted labels. The second output, accuracy, is a vector including accuracy (for classification), mean squared error, and squared correlation coefficient (for regression). The third is a matrix containing decision values or probability estimates (if '-b 1' is specified). If k is the number of classes and k' is the number of classifiers (k'=1 if k=2, otherwise k'=k), for decision values, each row includes results of k' binary linear classifiers. For probabilities, each row contains k values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as 'Label' field in the model structure. Other Utilities =============== A matlab function libsvmread reads files in LIBSVM format: [label_vector, instance_matrix] = libsvmread('data.txt'); Two outputs are labels and instances, which can then be used as inputs of svmtrain or svmpredict. A matlab function libsvmwrite writes Matlab matrix to a file in LIBSVM format: libsvmwrite('data.txt', label_vector, instance_matrix] The instance_matrix must be a sparse matrix. (type must be double) For windows, `libsvmread.mexw64' and `libsvmwrite.mexw64' are ready in the directory `..\windows'. These codes are prepared by Rong-En Fan and Kai-Wei Chang from National Taiwan University. Examples ======== Train and test on the provided data heart_scale: matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale'); matlab> model = train(heart_scale_label, heart_scale_inst, '-c 1'); matlab> [predict_label, accuracy, dec_values] = predict(heart_scale_label, heart_scale_inst, model); % test the training data Note that for testing, you can put anything in the testing_label_vector. For probability estimates, you need '-b 1' only in the testing phase: matlab> [predict_label, accuracy, prob_estimates] = predict(heart_scale_label, heart_scale_inst, model, '-b 1'); Additional Information ====================== Please cite LIBLINEAR as follows R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A Library for Large Linear Classification, Journal of Machine Learning Research 9(2008), 1871-1874.Software available at http://www.csie.ntu.edu.tw/~cjlin/liblinear For any question, please contact Chih-Jen Lin . ================================================ FILE: Matlab/liblinear-1.96/matlab/libsvmread.c ================================================ #include #include #include #include #include #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #ifndef max #define max(x,y) (((x)>(y))?(x):(y)) #endif #ifndef min #define min(x,y) (((x)<(y))?(x):(y)) #endif void exit_with_help() { mexPrintf( "Usage: [label_vector, instance_matrix] = libsvmread('filename');\n" ); } static void fake_answer(int nlhs, mxArray *plhs[]) { int i; for(i=0;i start from 0 strtok(line," \t"); // label while (1) { idx = strtok(NULL,":"); // index:value val = strtok(NULL," \t"); if(val == NULL) break; errno = 0; index = (int) strtol(idx,&endptr,10); if(endptr == idx || errno != 0 || *endptr != '\0' || index <= inst_max_index) { mexPrintf("Wrong input format at line %d\n",l+1); fake_answer(nlhs, plhs); return; } else inst_max_index = index; min_index = min(min_index, index); elements++; } max_index = max(max_index, inst_max_index); l++; } rewind(fp); // y plhs[0] = mxCreateDoubleMatrix(l, 1, mxREAL); // x^T if (min_index <= 0) plhs[1] = mxCreateSparse(max_index-min_index+1, l, elements, mxREAL); else plhs[1] = mxCreateSparse(max_index, l, elements, mxREAL); labels = mxGetPr(plhs[0]); samples = mxGetPr(plhs[1]); ir = mxGetIr(plhs[1]); jc = mxGetJc(plhs[1]); k=0; for(i=0;i start from 0 errno = 0; samples[k] = strtod(val,&endptr); if (endptr == val || errno != 0 || (*endptr != '\0' && !isspace(*endptr))) { mexPrintf("Wrong input format at line %d\n",i+1); fake_answer(nlhs, plhs); return; } ++k; } } jc[l] = k; fclose(fp); free(line); { mxArray *rhs[1], *lhs[1]; rhs[0] = plhs[1]; if(mexCallMATLAB(1, lhs, 1, rhs, "transpose")) { mexPrintf("Error: cannot transpose problem\n"); fake_answer(nlhs, plhs); return; } plhs[1] = lhs[0]; } } void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { char filename[256]; if(nrhs != 1 || nlhs != 2) { exit_with_help(); fake_answer(nlhs, plhs); return; } mxGetString(prhs[0], filename, mxGetN(prhs[0]) + 1); if(filename == NULL) { mexPrintf("Error: filename is NULL\n"); return; } read_problem(filename, nlhs, plhs); return; } ================================================ FILE: Matlab/liblinear-1.96/matlab/libsvmwrite.c ================================================ #include #include #include #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif void exit_with_help() { mexPrintf( "Usage: libsvmwrite('filename', label_vector, instance_matrix);\n" ); } static void fake_answer(int nlhs, mxArray *plhs[]) { int i; for(i=0;i 0) { exit_with_help(); fake_answer(nlhs, plhs); return; } // Transform the input Matrix to libsvm format if(nrhs == 3) { char filename[256]; if(!mxIsDouble(prhs[1]) || !mxIsDouble(prhs[2])) { mexPrintf("Error: label vector and instance matrix must be double\n"); return; } mxGetString(prhs[0], filename, mxGetN(prhs[0])+1); if(mxIsSparse(prhs[2])) libsvmwrite(filename, prhs[1], prhs[2]); else { mexPrintf("Instance_matrix must be sparse\n"); return; } } else { exit_with_help(); return; } } ================================================ FILE: Matlab/liblinear-1.96/matlab/linear_model_matlab.c ================================================ #include #include #include "../linear.h" #include "mex.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define NUM_OF_RETURN_FIELD 6 static const char *field_names[] = { "Parameters", "nr_class", "nr_feature", "bias", "Label", "w", }; const char *model_to_matlab_structure(mxArray *plhs[], struct model *model_) { int i; int nr_w; double *ptr; mxArray *return_model, **rhs; int out_id = 0; int n, w_size; rhs = (mxArray **)mxMalloc(sizeof(mxArray *)*NUM_OF_RETURN_FIELD); // Parameters // for now, only solver_type is needed rhs[out_id] = mxCreateDoubleMatrix(1, 1, mxREAL); ptr = mxGetPr(rhs[out_id]); ptr[0] = model_->param.solver_type; out_id++; // nr_class rhs[out_id] = mxCreateDoubleMatrix(1, 1, mxREAL); ptr = mxGetPr(rhs[out_id]); ptr[0] = model_->nr_class; out_id++; if(model_->nr_class==2 && model_->param.solver_type != MCSVM_CS) nr_w=1; else nr_w=model_->nr_class; // nr_feature rhs[out_id] = mxCreateDoubleMatrix(1, 1, mxREAL); ptr = mxGetPr(rhs[out_id]); ptr[0] = model_->nr_feature; out_id++; // bias rhs[out_id] = mxCreateDoubleMatrix(1, 1, mxREAL); ptr = mxGetPr(rhs[out_id]); ptr[0] = model_->bias; out_id++; if(model_->bias>=0) n=model_->nr_feature+1; else n=model_->nr_feature; w_size = n; // Label if(model_->label) { rhs[out_id] = mxCreateDoubleMatrix(model_->nr_class, 1, mxREAL); ptr = mxGetPr(rhs[out_id]); for(i = 0; i < model_->nr_class; i++) ptr[i] = model_->label[i]; } else rhs[out_id] = mxCreateDoubleMatrix(0, 0, mxREAL); out_id++; // w rhs[out_id] = mxCreateDoubleMatrix(nr_w, w_size, mxREAL); ptr = mxGetPr(rhs[out_id]); for(i = 0; i < w_size*nr_w; i++) ptr[i]=model_->w[i]; out_id++; /* Create a struct matrix contains NUM_OF_RETURN_FIELD fields */ return_model = mxCreateStructMatrix(1, 1, NUM_OF_RETURN_FIELD, field_names); /* Fill struct matrix with input arguments */ for(i = 0; i < NUM_OF_RETURN_FIELD; i++) mxSetField(return_model,0,field_names[i],mxDuplicateArray(rhs[i])); /* return */ plhs[0] = return_model; mxFree(rhs); return NULL; } const char *matlab_matrix_to_model(struct model *model_, const mxArray *matlab_struct) { int i, num_of_fields; int nr_w; double *ptr; int id = 0; int n, w_size; mxArray **rhs; num_of_fields = mxGetNumberOfFields(matlab_struct); rhs = (mxArray **) mxMalloc(sizeof(mxArray *)*num_of_fields); for(i=0;inr_class=0; nr_w=0; model_->nr_feature=0; model_->w=NULL; model_->label=NULL; // Parameters ptr = mxGetPr(rhs[id]); model_->param.solver_type = (int)ptr[0]; id++; // nr_class ptr = mxGetPr(rhs[id]); model_->nr_class = (int)ptr[0]; id++; if(model_->nr_class==2 && model_->param.solver_type != MCSVM_CS) nr_w=1; else nr_w=model_->nr_class; // nr_feature ptr = mxGetPr(rhs[id]); model_->nr_feature = (int)ptr[0]; id++; // bias ptr = mxGetPr(rhs[id]); model_->bias = ptr[0]; id++; if(model_->bias>=0) n=model_->nr_feature+1; else n=model_->nr_feature; w_size = n; // Label if(mxIsEmpty(rhs[id]) == 0) { model_->label = Malloc(int, model_->nr_class); ptr = mxGetPr(rhs[id]); for(i=0;inr_class;i++) model_->label[i] = (int)ptr[i]; } id++; ptr = mxGetPr(rhs[id]); model_->w=Malloc(double, w_size*nr_w); for(i = 0; i < w_size*nr_w; i++) model_->w[i]=ptr[i]; id++; mxFree(rhs); return NULL; } ================================================ FILE: Matlab/liblinear-1.96/matlab/linear_model_matlab.h ================================================ const char *model_to_matlab_structure(mxArray *plhs[], struct model *model_); const char *matlab_matrix_to_model(struct model *model_, const mxArray *matlab_struct); ================================================ FILE: Matlab/liblinear-1.96/matlab/make.m ================================================ % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix try Type = ver; % This part is for OCTAVE if(strcmp(Type(1).Name, 'Octave') == 1) mex libsvmread.c mex libsvmwrite.c mex train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dscal.c mex predict.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dscal.c % This part is for MATLAB % Add -largeArrayDims on 64-bit machines of MATLAB else mex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims libsvmread.c mex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims libsvmwrite.c mex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dscal.c mex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims predict.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dscal.c end catch fprintf('If make.m fails, please check README about detailed instructions.\n'); end ================================================ FILE: Matlab/liblinear-1.96/matlab/predict.c ================================================ #include #include #include #include "../linear.h" #include "mex.h" #include "linear_model_matlab.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define CMD_LEN 2048 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) int print_null(const char *s,...) {} int (*info)(const char *fmt,...); int col_format_flag; void read_sparse_instance(const mxArray *prhs, int index, struct feature_node *x, int feature_number, double bias) { int j; mwIndex *ir, *jc, low, high, i; double *samples; ir = mxGetIr(prhs); jc = mxGetJc(prhs); samples = mxGetPr(prhs); // each column is one instance j = 0; low = jc[index], high = jc[index+1]; for(i=low; i=0) { x[j].index = feature_number+1; x[j].value = bias; j++; } x[j].index = -1; } static void fake_answer(int nlhs, mxArray *plhs[]) { int i; for(i=0;iparam.solver_type!=MCSVM_CS) nr_w=1; else nr_w=nr_class; // prhs[1] = testing instance matrix feature_number = get_nr_feature(model_); testing_instance_number = (int) mxGetM(prhs[1]); if(col_format_flag) { feature_number = (int) mxGetM(prhs[1]); testing_instance_number = (int) mxGetN(prhs[1]); } label_vector_row_num = (int) mxGetM(prhs[0]); label_vector_col_num = (int) mxGetN(prhs[0]); if(label_vector_row_num!=testing_instance_number) { mexPrintf("Length of label vector does not match # of instances.\n"); fake_answer(nlhs, plhs); return; } if(label_vector_col_num!=1) { mexPrintf("label (1st argument) should be a vector (# of column is 1).\n"); fake_answer(nlhs, plhs); return; } ptr_label = mxGetPr(prhs[0]); // transpose instance matrix if(col_format_flag) pplhs[0] = (mxArray *)prhs[1]; else { mxArray *pprhs[1]; pprhs[0] = mxDuplicateArray(prhs[1]); if(mexCallMATLAB(1, pplhs, 1, pprhs, "transpose")) { mexPrintf("Error: cannot transpose testing instance matrix\n"); fake_answer(nlhs, plhs); return; } } prob_estimates = Malloc(double, nr_class); tplhs[0] = mxCreateDoubleMatrix(testing_instance_number, 1, mxREAL); if(predict_probability_flag) tplhs[2] = mxCreateDoubleMatrix(testing_instance_number, nr_class, mxREAL); else tplhs[2] = mxCreateDoubleMatrix(testing_instance_number, nr_w, mxREAL); ptr_predict_label = mxGetPr(tplhs[0]); ptr_prob_estimates = mxGetPr(tplhs[2]); ptr_dec_values = mxGetPr(tplhs[2]); x = Malloc(struct feature_node, feature_number+2); for(instance_index=0;instance_indexbias); if(predict_probability_flag) { predict_label = predict_probability(model_, x, prob_estimates); ptr_predict_label[instance_index] = predict_label; for(i=0;i 3 || nrhs > 5 || nrhs < 3) { exit_with_help(); fake_answer(nlhs, plhs); return; } if(nrhs == 5) { mxGetString(prhs[4], cmd, mxGetN(prhs[4])+1); if(strcmp(cmd, "col") == 0) { col_format_flag = 1; } } if(!mxIsDouble(prhs[0]) || !mxIsDouble(prhs[1])) { mexPrintf("Error: label vector and instance matrix must be double\n"); fake_answer(nlhs, plhs); return; } if(mxIsStruct(prhs[2])) { const char *error_msg; // parse options if(nrhs>=4) { int i, argc = 1; char *argv[CMD_LEN/2]; // put options in argv[] mxGetString(prhs[3], cmd, mxGetN(prhs[3]) + 1); if((argv[argc] = strtok(cmd, " ")) != NULL) while((argv[++argc] = strtok(NULL, " ")) != NULL) ; for(i=1;i=argc && argv[i-1][1] != 'q') { exit_with_help(); fake_answer(nlhs, plhs); return; } switch(argv[i-1][1]) { case 'b': prob_estimate_flag = atoi(argv[i]); break; case 'q': info = &print_null; i--; break; default: mexPrintf("unknown option\n"); exit_with_help(); fake_answer(nlhs, plhs); return; } } } model_ = Malloc(struct model, 1); error_msg = matlab_matrix_to_model(model_, prhs[2]); if(error_msg) { mexPrintf("Error: can't read model: %s\n", error_msg); free_and_destroy_model(&model_); fake_answer(nlhs, plhs); return; } if(prob_estimate_flag) { if(!check_probability_model(model_)) { mexPrintf("probability output is only supported for logistic regression\n"); prob_estimate_flag=0; } } if(mxIsSparse(prhs[1])) do_predict(nlhs, plhs, prhs, model_, prob_estimate_flag); else { mexPrintf("Testing_instance_matrix must be sparse; " "use sparse(Testing_instance_matrix) first\n"); fake_answer(nlhs, plhs); } // destroy model_ free_and_destroy_model(&model_); } else { mexPrintf("model file should be a struct array\n"); fake_answer(nlhs, plhs); } return; } ================================================ FILE: Matlab/liblinear-1.96/matlab/train.c ================================================ #include #include #include #include #include #include "../linear.h" #include "mex.h" #include "linear_model_matlab.h" #ifdef MX_API_VER #if MX_API_VER < 0x07030000 typedef int mwIndex; #endif #endif #define CMD_LEN 2048 #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define INF HUGE_VAL void print_null(const char *s) {} void print_string_matlab(const char *s) {mexPrintf(s);} void exit_with_help() { mexPrintf( "Usage: model = train(training_label_vector, training_instance_matrix, 'liblinear_options', 'col');\n" "liblinear_options:\n" "-s type : set type of solver (default 1)\n" " for multi-class classification\n" " 0 -- L2-regularized logistic regression (primal)\n" " 1 -- L2-regularized L2-loss support vector classification (dual)\n" " 2 -- L2-regularized L2-loss support vector classification (primal)\n" " 3 -- L2-regularized L1-loss support vector classification (dual)\n" " 4 -- support vector classification by Crammer and Singer\n" " 5 -- L1-regularized L2-loss support vector classification\n" " 6 -- L1-regularized logistic regression\n" " 7 -- L2-regularized logistic regression (dual)\n" " for regression\n" " 11 -- L2-regularized L2-loss support vector regression (primal)\n" " 12 -- L2-regularized L2-loss support vector regression (dual)\n" " 13 -- L2-regularized L1-loss support vector regression (dual)\n" "-c cost : set the parameter C (default 1)\n" "-p epsilon : set the epsilon in loss function of SVR (default 0.1)\n" "-e epsilon : set tolerance of termination criterion\n" " -s 0 and 2\n" " |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2,\n" " where f is the primal function and pos/neg are # of\n" " positive/negative data (default 0.01)\n" " -s 11\n" " |f'(w)|_2 <= eps*|f'(w0)|_2 (default 0.001)\n" " -s 1, 3, 4 and 7\n" " Dual maximal violation <= eps; similar to libsvm (default 0.1)\n" " -s 5 and 6\n" " |f'(w)|_1 <= eps*min(pos,neg)/l*|f'(w0)|_1,\n" " where f is the primal function (default 0.01)\n" " -s 12 and 13\n" " |f'(alpha)|_1 <= eps |f'(alpha0)|,\n" " where f is the dual function (default 0.1)\n" "-B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)\n" "-wi weight: weights adjust the parameter C of different classes (see README for details)\n" "-v n: n-fold cross validation mode\n" "-q : quiet mode (no outputs)\n" "col:\n" " if 'col' is setted, training_instance_matrix is parsed in column format, otherwise is in row format\n" ); } // liblinear arguments struct parameter param; // set by parse_command_line struct problem prob; // set by read_problem struct model *model_; struct feature_node *x_space; int cross_validation_flag; int col_format_flag; int nr_fold; double bias; double do_cross_validation() { int i; int total_correct = 0; double total_error = 0; double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0; double *target = Malloc(double, prob.l); double retval = 0.0; cross_validation(&prob,¶m,nr_fold,target); if(param.solver_type == L2R_L2LOSS_SVR || param.solver_type == L2R_L1LOSS_SVR_DUAL || param.solver_type == L2R_L2LOSS_SVR_DUAL) { for(i=0;i 2) { mxGetString(prhs[2], cmd, mxGetN(prhs[2]) + 1); if((argv[argc] = strtok(cmd, " ")) != NULL) while((argv[++argc] = strtok(NULL, " ")) != NULL) ; } // parse options for(i=1;i=argc && argv[i-1][1] != 'q') // since option -q has no parameter return 1; switch(argv[i-1][1]) { case 's': param.solver_type = atoi(argv[i]); break; case 'c': param.C = atof(argv[i]); break; case 'p': param.p = atof(argv[i]); break; case 'e': param.eps = atof(argv[i]); break; case 'B': bias = atof(argv[i]); break; case 'v': cross_validation_flag = 1; nr_fold = atoi(argv[i]); if(nr_fold < 2) { mexPrintf("n-fold cross validation: n must >= 2\n"); return 1; } break; case 'w': ++param.nr_weight; param.weight_label = (int *) realloc(param.weight_label,sizeof(int)*param.nr_weight); param.weight = (double *) realloc(param.weight,sizeof(double)*param.nr_weight); param.weight_label[param.nr_weight-1] = atoi(&argv[i-1][2]); param.weight[param.nr_weight-1] = atof(argv[i]); break; case 'q': print_func = &print_null; i--; break; default: mexPrintf("unknown option\n"); return 1; } } set_print_string_function(print_func); if(param.eps == INF) { switch(param.solver_type) { case L2R_LR: case L2R_L2LOSS_SVC: param.eps = 0.01; break; case L2R_L2LOSS_SVR: param.eps = 0.001; break; case L2R_L2LOSS_SVC_DUAL: case L2R_L1LOSS_SVC_DUAL: case MCSVM_CS: case L2R_LR_DUAL: param.eps = 0.1; break; case L1R_L2LOSS_SVC: case L1R_LR: param.eps = 0.01; break; case L2R_L1LOSS_SVR_DUAL: case L2R_L2LOSS_SVR_DUAL: param.eps = 0.1; break; } } return 0; } static void fake_answer(int nlhs, mxArray *plhs[]) { int i; for(i=0;i=0) { x_space[j].index = (int) max_index+1; x_space[j].value = prob.bias; j++; } x_space[j++].index = -1; } if(prob.bias>=0) prob.n = (int) max_index+1; else prob.n = (int) max_index; return 0; } // Interface function of matlab // now assume prhs[0]: label prhs[1]: features void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { const char *error_msg; // fix random seed to have same results for each run // (for cross validation) srand(1); if(nlhs > 1) { exit_with_help(); fake_answer(nlhs, plhs); return; } // Transform the input Matrix to libsvm format if(nrhs > 1 && nrhs < 5) { int err=0; if(!mxIsDouble(prhs[0]) || !mxIsDouble(prhs[1])) { mexPrintf("Error: label vector and instance matrix must be double\n"); fake_answer(nlhs, plhs); return; } if(mxIsSparse(prhs[0])) { mexPrintf("Error: label vector should not be in sparse format"); fake_answer(nlhs, plhs); return; } if(parse_command_line(nrhs, prhs, NULL)) { exit_with_help(); destroy_param(¶m); fake_answer(nlhs, plhs); return; } if(mxIsSparse(prhs[1])) err = read_problem_sparse(prhs[0], prhs[1]); else { mexPrintf("Training_instance_matrix must be sparse; " "use sparse(Training_instance_matrix) first\n"); destroy_param(¶m); fake_answer(nlhs, plhs); return; } // train's original code error_msg = check_parameter(&prob, ¶m); if(err || error_msg) { if (error_msg != NULL) mexPrintf("Error: %s\n", error_msg); destroy_param(¶m); free(prob.y); free(prob.x); free(x_space); fake_answer(nlhs, plhs); return; } if(cross_validation_flag) { double *ptr; plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL); ptr = mxGetPr(plhs[0]); ptr[0] = do_cross_validation(); } else { const char *error_msg; model_ = train(&prob, ¶m); error_msg = model_to_matlab_structure(plhs, model_); if(error_msg) mexPrintf("Error: can't convert libsvm model to matrix structure: %s\n", error_msg); free_and_destroy_model(&model_); } destroy_param(¶m); free(prob.y); free(prob.x); free(x_space); } else { exit_with_help(); fake_answer(nlhs, plhs); return; } } ================================================ FILE: Matlab/liblinear-1.96/predict.c ================================================ #include #include #include #include #include #include "linear.h" int print_null(const char *s,...) {return 0;} static int (*info)(const char *fmt,...) = &printf; struct feature_node *x; int max_nr_attr = 64; struct model* model_; int flag_predict_probability=0; void exit_input_error(int line_num) { fprintf(stderr,"Wrong input format at line %d\n", line_num); exit(1); } static char *line = NULL; static int max_line_len; static char* readline(FILE *input) { int len; if(fgets(line,max_line_len,input) == NULL) return NULL; while(strrchr(line,'\n') == NULL) { max_line_len *= 2; line = (char *) realloc(line,max_line_len); len = (int) strlen(line); if(fgets(line+len,max_line_len-len,input) == NULL) break; } return line; } void do_predict(FILE *input, FILE *output) { int correct = 0; int total = 0; double error = 0; double sump = 0, sumt = 0, sumpp = 0, sumtt = 0, sumpt = 0; int nr_class=get_nr_class(model_); double *prob_estimates=NULL; int j, n; int nr_feature=get_nr_feature(model_); if(model_->bias>=0) n=nr_feature+1; else n=nr_feature; if(flag_predict_probability) { int *labels; if(!check_probability_model(model_)) { fprintf(stderr, "probability output is only supported for logistic regression\n"); exit(1); } labels=(int *) malloc(nr_class*sizeof(int)); get_labels(model_,labels); prob_estimates = (double *) malloc(nr_class*sizeof(double)); fprintf(output,"labels"); for(j=0;j=max_nr_attr-2) // need one more for index = -1 { max_nr_attr *= 2; x = (struct feature_node *) realloc(x,max_nr_attr*sizeof(struct feature_node)); } idx = strtok(NULL,":"); val = strtok(NULL," \t"); if(val == NULL) break; errno = 0; x[i].index = (int) strtol(idx,&endptr,10); if(endptr == idx || errno != 0 || *endptr != '\0' || x[i].index <= inst_max_index) exit_input_error(total+1); else inst_max_index = x[i].index; errno = 0; x[i].value = strtod(val,&endptr); if(endptr == val || errno != 0 || (*endptr != '\0' && !isspace(*endptr))) exit_input_error(total+1); // feature indices larger than those in training are not used if(x[i].index <= nr_feature) ++i; } if(model_->bias>=0) { x[i].index = n; x[i].value = model_->bias; i++; } x[i].index = -1; if(flag_predict_probability) { int j; predict_label = predict_probability(model_,x,prob_estimates); fprintf(output,"%g",predict_label); for(j=0;jnr_class;j++) fprintf(output," %g",prob_estimates[j]); fprintf(output,"\n"); } else { predict_label = predict(model_,x); fprintf(output,"%g\n",predict_label); } if(predict_label == target_label) ++correct; error += (predict_label-target_label)*(predict_label-target_label); sump += predict_label; sumt += target_label; sumpp += predict_label*predict_label; sumtt += target_label*target_label; sumpt += predict_label*target_label; ++total; } if(check_regression_model(model_)) { info("Mean squared error = %g (regression)\n",error/total); info("Squared correlation coefficient = %g (regression)\n", ((total*sumpt-sump*sumt)*(total*sumpt-sump*sumt))/ ((total*sumpp-sump*sump)*(total*sumtt-sumt*sumt)) ); } else info("Accuracy = %g%% (%d/%d)\n",(double) correct/total*100,correct,total); if(flag_predict_probability) free(prob_estimates); } void exit_with_help() { printf( "Usage: predict [options] test_file model_file output_file\n" "options:\n" "-b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only\n" "-q : quiet mode (no outputs)\n" ); exit(1); } int main(int argc, char **argv) { FILE *input, *output; int i; // parse options for(i=1;i=argc) exit_with_help(); input = fopen(argv[i],"r"); if(input == NULL) { fprintf(stderr,"can't open input file %s\n",argv[i]); exit(1); } output = fopen(argv[i+2],"w"); if(output == NULL) { fprintf(stderr,"can't open output file %s\n",argv[i+2]); exit(1); } if((model_=load_model(argv[i+1]))==0) { fprintf(stderr,"can't open model file %s\n",argv[i+1]); exit(1); } x = (struct feature_node *) malloc(max_nr_attr*sizeof(struct feature_node)); do_predict(input, output); free_and_destroy_model(&model_); free(line); free(x); fclose(input); fclose(output); return 0; } ================================================ FILE: Matlab/liblinear-1.96/python/Makefile ================================================ all = lib lib: make -C .. lib ================================================ FILE: Matlab/liblinear-1.96/python/README ================================================ ------------------------------------- --- Python interface of LIBLINEAR --- ------------------------------------- Table of Contents ================= - Introduction - Installation - Quick Start - Design Description - Data Structures - Utility Functions - Additional Information Introduction ============ Python (http://www.python.org/) is a programming language suitable for rapid development. This tool provides a simple Python interface to LIBLINEAR, a library for support vector machines (http://www.csie.ntu.edu.tw/~cjlin/liblinear). The interface is very easy to use as the usage is the same as that of LIBLINEAR. The interface is developed with the built-in Python library "ctypes." Installation ============ On Unix systems, type > make The interface needs only LIBLINEAR shared library, which is generated by the above command. We assume that the shared library is on the LIBLINEAR main directory or in the system path. For windows, the shared library liblinear.dll is ready in the directory `..\windows'. You can also copy it to the system directory (e.g., `C:\WINDOWS\system32\' for Windows XP). To regenerate the shared library, please follow the instruction of building windows binaries in LIBLINEAR README. Quick Start =========== There are two levels of usage. The high-level one uses utility functions in liblinearutil.py and the usage is the same as the LIBLINEAR MATLAB interface. >>> from liblinearutil import * # Read data in LIBSVM format >>> y, x = svm_read_problem('../heart_scale') >>> m = train(y[:200], x[:200], '-c 4') >>> p_label, p_acc, p_val = predict(y[200:], x[200:], m) # Construct problem in python format # Dense data >>> y, x = [1,-1], [[1,0,1], [-1,0,-1]] # Sparse data >>> y, x = [1,-1], [{1:1, 3:1}, {1:-1,3:-1}] >>> prob = problem(y, x) >>> param = parameter('-s 0 -c 4 -B 1') >>> m = train(prob, param) # Other utility functions >>> save_model('heart_scale.model', m) >>> m = load_model('heart_scale.model') >>> p_label, p_acc, p_val = predict(y, x, m, '-b 1') >>> ACC, MSE, SCC = evaluations(y, p_label) # Getting online help >>> help(train) The low-level use directly calls C interfaces imported by liblinear.py. Note that all arguments and return values are in ctypes format. You need to handle them carefully. >>> from liblinear import * >>> prob = problem([1,-1], [{1:1, 3:1}, {1:-1,3:-1}]) >>> param = parameter('-c 4') >>> m = liblinear.train(prob, param) # m is a ctype pointer to a model # Convert a Python-format instance to feature_nodearray, a ctypes structure >>> x0, max_idx = gen_feature_nodearray({1:1, 3:1}) >>> label = liblinear.predict(m, x0) Design Description ================== There are two files liblinear.py and liblinearutil.py, which respectively correspond to low-level and high-level use of the interface. In liblinear.py, we adopt the Python built-in library "ctypes," so that Python can directly access C structures and interface functions defined in linear.h. While advanced users can use structures/functions in liblinear.py, to avoid handling ctypes structures, in liblinearutil.py we provide some easy-to-use functions. The usage is similar to LIBLINEAR MATLAB interface. Data Structures =============== Three data structures derived from linear.h are node, problem, and parameter. They all contain fields with the same names in linear.h. Access these fields carefully because you directly use a C structure instead of a Python object. The following description introduces additional fields and methods. Before using the data structures, execute the following command to load the LIBLINEAR shared library: >>> from liblinear import * - class feature_node: Construct a feature_node. >>> node = feature_node(idx, val) idx: an integer indicates the feature index. val: a float indicates the feature value. Show the index and the value of a node. >>> print(node) - Function: gen_feature_nodearray(xi [,feature_max=None [,issparse=True]]) Generate a feature vector from a Python list/tuple or a dictionary: >>> xi, max_idx = gen_feature_nodearray({1:1, 3:1, 5:-2}) xi: the returned feature_nodearray (a ctypes structure) max_idx: the maximal feature index of xi issparse: if issparse == True, zero feature values are removed. The default value is True for the sparsity. feature_max: if feature_max is assigned, features with indices larger than feature_max are removed. - class problem: Construct a problem instance >>> prob = problem(y, x [,bias=-1]) y: a Python list/tuple of l labels (type must be int/double). x: a Python list/tuple of l data instances. Each element of x must be an instance of list/tuple/dictionary type. bias: if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1) You can also modify the bias value by >>> prob.set_bias(1) Note that if your x contains sparse data (i.e., dictionary), the internal ctypes data format is still sparse. - class parameter: Construct a parameter instance >>> param = parameter('training_options') If 'training_options' is empty, LIBLINEAR default values are applied. Set param to LIBLINEAR default values. >>> param.set_to_default_values() Parse a string of options. >>> param.parse_options('training_options') Show values of parameters. >>> print(param) - class model: There are two ways to obtain an instance of model: >>> model_ = train(y, x) >>> model_ = load_model('model_file_name') Note that the returned structure of interface functions liblinear.train and liblinear.load_model is a ctypes pointer of model, which is different from the model object returned by train and load_model in liblinearutil.py. We provide a function toPyModel for the conversion: >>> model_ptr = liblinear.train(prob, param) >>> model_ = toPyModel(model_ptr) If you obtain a model in a way other than the above approaches, handle it carefully to avoid memory leak or segmentation fault. Some interface functions to access LIBLINEAR models are wrapped as members of the class model: >>> nr_feature = model_.get_nr_feature() >>> nr_class = model_.get_nr_class() >>> class_labels = model_.get_labels() >>> is_prob_model = model_.is_probability_model() >>> is_regression_model = model_.is_regression_model() The decision function is W*x + b, where W is an nr_class-by-nr_feature matrix, and b is a vector of size nr_class. To access W_kj (i.e., coefficient for the k-th class and the j-th feature) and b_k (i.e., bias for the k-th class), use the following functions. >>> W_kj = model_.get_decfun_coef(feat_idx=j, label_idx=k) >>> b_k = model_.get_decfun_bias(label_idx=k) We also provide a function to extract w_k (i.e., the k-th row of W) and b_k directly as follows. >>> [w_k, b_k] = model_.get_decfun(label_idx=k) Note that w_k is a Python list of length nr_feature, which means that w_k[0] = W_k1. For regression models, W is just a vector of length nr_feature. Either set label_idx=0 or omit the label_idx parameter to access the coefficients. >>> W_j = model_.get_decfun_coef(feat_idx=j) >>> b = model_.get_decfun_bias() >>> [W, b] = model_.get_decfun() Note that in get_decfun_coef, get_decfun_bias, and get_decfun, feat_idx starts from 1, while label_idx starts from 0. If label_idx is not in the valid range (0 to nr_class-1), then a NaN will be returned; and if feat_idx is not in the valid range (1 to nr_feature), then a zero value will be returned. For regression models, label_idx is ignored. Utility Functions ================= To use utility functions, type >>> from liblinearutil import * The above command loads train() : train a linear model predict() : predict testing data svm_read_problem() : read the data from a LIBSVM-format file. load_model() : load a LIBLINEAR model. save_model() : save model to a file. evaluations() : evaluate prediction results. - Function: train There are three ways to call train() >>> model = train(y, x [, 'training_options']) >>> model = train(prob [, 'training_options']) >>> model = train(prob, param) y: a list/tuple of l training labels (type must be int/double). x: a list/tuple of l training instances. The feature vector of each training instance is an instance of list/tuple or dictionary. training_options: a string in the same form as that for LIBLINEAR command mode. prob: a problem instance generated by calling problem(y, x). param: a parameter instance generated by calling parameter('training_options') model: the returned model instance. See linear.h for details of this structure. If '-v' is specified, cross validation is conducted and the returned model is just a scalar: cross-validation accuracy for classification and mean-squared error for regression. To train the same data many times with different parameters, the second and the third ways should be faster.. Examples: >>> y, x = svm_read_problem('../heart_scale') >>> prob = problem(y, x) >>> param = parameter('-s 3 -c 5 -q') >>> m = train(y, x, '-c 5') >>> m = train(prob, '-w1 5 -c 5') >>> m = train(prob, param) >>> CV_ACC = train(y, x, '-v 3') - Function: predict To predict testing data with a model, use >>> p_labs, p_acc, p_vals = predict(y, x, model [,'predicting_options']) y: a list/tuple of l true labels (type must be int/double). It is used for calculating the accuracy. Use [] if true labels are unavailable. x: a list/tuple of l predicting instances. The feature vector of each predicting instance is an instance of list/tuple or dictionary. predicting_options: a string of predicting options in the same format as that of LIBLINEAR. model: a model instance. p_labels: a list of predicted labels p_acc: a tuple including accuracy (for classification), mean squared error, and squared correlation coefficient (for regression). p_vals: a list of decision values or probability estimates (if '-b 1' is specified). If k is the number of classes, for decision values, each element includes results of predicting k binary-class SVMs. If k = 2 and solver is not MCSVM_CS, only one decision value is returned. For probabilities, each element contains k values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as 'model.label' field in the model structure. Example: >>> m = train(y, x, '-c 5') >>> p_labels, p_acc, p_vals = predict(y, x, m) - Functions: svm_read_problem/load_model/save_model See the usage by examples: >>> y, x = svm_read_problem('data.txt') >>> m = load_model('model_file') >>> save_model('model_file', m) - Function: evaluations Calculate some evaluations using the true values (ty) and predicted values (pv): >>> (ACC, MSE, SCC) = evaluations(ty, pv) ty: a list of true values. pv: a list of predict values. ACC: accuracy. MSE: mean squared error. SCC: squared correlation coefficient. Additional Information ====================== This interface was written by Hsiang-Fu Yu from Department of Computer Science, National Taiwan University. If you find this tool useful, please cite LIBLINEAR as follows R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A Library for Large Linear Classification, Journal of Machine Learning Research 9(2008), 1871-1874. Software available at http://www.csie.ntu.edu.tw/~cjlin/liblinear For any question, please contact Chih-Jen Lin , or check the FAQ page: http://www.csie.ntu.edu.tw/~cjlin/liblinear/faq.html ================================================ FILE: Matlab/liblinear-1.96/python/liblinear.py ================================================ #!/usr/bin/env python from ctypes import * from ctypes.util import find_library from os import path import sys __all__ = ['liblinear', 'feature_node', 'gen_feature_nodearray', 'problem', 'parameter', 'model', 'toPyModel', 'L2R_LR', 'L2R_L2LOSS_SVC_DUAL', 'L2R_L2LOSS_SVC', 'L2R_L1LOSS_SVC_DUAL', 'MCSVM_CS', 'L1R_L2LOSS_SVC', 'L1R_LR', 'L2R_LR_DUAL', 'L2R_L2LOSS_SVR', 'L2R_L2LOSS_SVR_DUAL', 'L2R_L1LOSS_SVR_DUAL', 'print_null'] try: dirname = path.dirname(path.abspath(__file__)) if sys.platform == 'win32': liblinear = CDLL(path.join(dirname, r'..\windows\liblinear.dll')) else: liblinear = CDLL(path.join(dirname, '../liblinear.so.2')) except: # For unix the prefix 'lib' is not considered. if find_library('linear'): liblinear = CDLL(find_library('linear')) elif find_library('liblinear'): liblinear = CDLL(find_library('liblinear')) else: raise Exception('LIBLINEAR library not found.') L2R_LR = 0 L2R_L2LOSS_SVC_DUAL = 1 L2R_L2LOSS_SVC = 2 L2R_L1LOSS_SVC_DUAL = 3 MCSVM_CS = 4 L1R_L2LOSS_SVC = 5 L1R_LR = 6 L2R_LR_DUAL = 7 L2R_L2LOSS_SVR = 11 L2R_L2LOSS_SVR_DUAL = 12 L2R_L1LOSS_SVR_DUAL = 13 PRINT_STRING_FUN = CFUNCTYPE(None, c_char_p) def print_null(s): return def genFields(names, types): return list(zip(names, types)) def fillprototype(f, restype, argtypes): f.restype = restype f.argtypes = argtypes class feature_node(Structure): _names = ["index", "value"] _types = [c_int, c_double] _fields_ = genFields(_names, _types) def __str__(self): return '%d:%g' % (self.index, self.value) def gen_feature_nodearray(xi, feature_max=None, issparse=True): if isinstance(xi, dict): index_range = xi.keys() elif isinstance(xi, (list, tuple)): xi = [0] + xi # idx should start from 1 index_range = range(1, len(xi)) else: raise TypeError('xi should be a dictionary, list or tuple') if feature_max: assert(isinstance(feature_max, int)) index_range = filter(lambda j: j <= feature_max, index_range) if issparse: index_range = filter(lambda j:xi[j] != 0, index_range) index_range = sorted(index_range) ret = (feature_node * (len(index_range)+2))() ret[-1].index = -1 # for bias term ret[-2].index = -1 for idx, j in enumerate(index_range): ret[idx].index = j ret[idx].value = xi[j] max_idx = 0 if index_range : max_idx = index_range[-1] return ret, max_idx class problem(Structure): _names = ["l", "n", "y", "x", "bias"] _types = [c_int, c_int, POINTER(c_double), POINTER(POINTER(feature_node)), c_double] _fields_ = genFields(_names, _types) def __init__(self, y, x, bias = -1): if len(y) != len(x) : raise ValueError("len(y) != len(x)") self.l = l = len(y) self.bias = -1 max_idx = 0 x_space = self.x_space = [] for i, xi in enumerate(x): tmp_xi, tmp_idx = gen_feature_nodearray(xi) x_space += [tmp_xi] max_idx = max(max_idx, tmp_idx) self.n = max_idx self.y = (c_double * l)() for i, yi in enumerate(y): self.y[i] = y[i] self.x = (POINTER(feature_node) * l)() for i, xi in enumerate(self.x_space): self.x[i] = xi self.set_bias(bias) def set_bias(self, bias): if self.bias == bias: return if bias >= 0 and self.bias < 0: self.n += 1 node = feature_node(self.n, bias) if bias < 0 and self.bias >= 0: self.n -= 1 node = feature_node(-1, bias) for xi in self.x_space: xi[-2] = node self.bias = bias class parameter(Structure): _names = ["solver_type", "eps", "C", "nr_weight", "weight_label", "weight", "p"] _types = [c_int, c_double, c_double, c_int, POINTER(c_int), POINTER(c_double), c_double] _fields_ = genFields(_names, _types) def __init__(self, options = None): if options == None: options = '' self.parse_options(options) def __str__(self): s = '' attrs = parameter._names + list(self.__dict__.keys()) values = map(lambda attr: getattr(self, attr), attrs) for attr, val in zip(attrs, values): s += (' %s: %s\n' % (attr, val)) s = s.strip() return s def set_to_default_values(self): self.solver_type = L2R_L2LOSS_SVC_DUAL self.eps = float('inf') self.C = 1 self.p = 0.1 self.nr_weight = 0 self.weight_label = (c_int * 0)() self.weight = (c_double * 0)() self.bias = -1 self.cross_validation = False self.nr_fold = 0 self.print_func = cast(None, PRINT_STRING_FUN) def parse_options(self, options): if isinstance(options, list): argv = options elif isinstance(options, str): argv = options.split() else: raise TypeError("arg 1 should be a list or a str.") self.set_to_default_values() self.print_func = cast(None, PRINT_STRING_FUN) weight_label = [] weight = [] i = 0 while i < len(argv) : if argv[i] == "-s": i = i + 1 self.solver_type = int(argv[i]) elif argv[i] == "-c": i = i + 1 self.C = float(argv[i]) elif argv[i] == "-p": i = i + 1 self.p = float(argv[i]) elif argv[i] == "-e": i = i + 1 self.eps = float(argv[i]) elif argv[i] == "-B": i = i + 1 self.bias = float(argv[i]) elif argv[i] == "-v": i = i + 1 self.cross_validation = 1 self.nr_fold = int(argv[i]) if self.nr_fold < 2 : raise ValueError("n-fold cross validation: n must >= 2") elif argv[i].startswith("-w"): i = i + 1 self.nr_weight += 1 nr_weight = self.nr_weight weight_label += [int(argv[i-1][2:])] weight += [float(argv[i])] elif argv[i] == "-q": self.print_func = PRINT_STRING_FUN(print_null) else : raise ValueError("Wrong options") i += 1 liblinear.set_print_string_function(self.print_func) self.weight_label = (c_int*self.nr_weight)() self.weight = (c_double*self.nr_weight)() for i in range(self.nr_weight): self.weight[i] = weight[i] self.weight_label[i] = weight_label[i] if self.eps == float('inf'): if self.solver_type in [L2R_LR, L2R_L2LOSS_SVC]: self.eps = 0.01 elif self.solver_type in [L2R_L2LOSS_SVR]: self.eps = 0.001 elif self.solver_type in [L2R_L2LOSS_SVC_DUAL, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L2R_LR_DUAL]: self.eps = 0.1 elif self.solver_type in [L1R_L2LOSS_SVC, L1R_LR]: self.eps = 0.01 elif self.solver_type in [L2R_L2LOSS_SVR_DUAL, L2R_L1LOSS_SVR_DUAL]: self.eps = 0.1 class model(Structure): _names = ["param", "nr_class", "nr_feature", "w", "label", "bias"] _types = [parameter, c_int, c_int, POINTER(c_double), POINTER(c_int), c_double] _fields_ = genFields(_names, _types) def __init__(self): self.__createfrom__ = 'python' def __del__(self): # free memory created by C to avoid memory leak if hasattr(self, '__createfrom__') and self.__createfrom__ == 'C': liblinear.free_and_destroy_model(pointer(self)) def get_nr_feature(self): return liblinear.get_nr_feature(self) def get_nr_class(self): return liblinear.get_nr_class(self) def get_labels(self): nr_class = self.get_nr_class() labels = (c_int * nr_class)() liblinear.get_labels(self, labels) return labels[:nr_class] def get_decfun_coef(self, feat_idx, label_idx=0): return liblinear.get_decfun_coef(self, feat_idx, label_idx) def get_decfun_bias(self, label_idx=0): return liblinear.get_decfun_bias(self, label_idx) def get_decfun(self, label_idx=0): w = [liblinear.get_decfun_coef(self, feat_idx, label_idx) for feat_idx in range(1, self.nr_feature+1)] b = liblinear.get_decfun_bias(self, label_idx) return (w, b) def is_probability_model(self): return (liblinear.check_probability_model(self) == 1) def is_regression_model(self): return (liblinear.check_regression_model(self) == 1) def toPyModel(model_ptr): """ toPyModel(model_ptr) -> model Convert a ctypes POINTER(model) to a Python model """ if bool(model_ptr) == False: raise ValueError("Null pointer") m = model_ptr.contents m.__createfrom__ = 'C' return m fillprototype(liblinear.train, POINTER(model), [POINTER(problem), POINTER(parameter)]) fillprototype(liblinear.cross_validation, None, [POINTER(problem), POINTER(parameter), c_int, POINTER(c_double)]) fillprototype(liblinear.predict_values, c_double, [POINTER(model), POINTER(feature_node), POINTER(c_double)]) fillprototype(liblinear.predict, c_double, [POINTER(model), POINTER(feature_node)]) fillprototype(liblinear.predict_probability, c_double, [POINTER(model), POINTER(feature_node), POINTER(c_double)]) fillprototype(liblinear.save_model, c_int, [c_char_p, POINTER(model)]) fillprototype(liblinear.load_model, POINTER(model), [c_char_p]) fillprototype(liblinear.get_nr_feature, c_int, [POINTER(model)]) fillprototype(liblinear.get_nr_class, c_int, [POINTER(model)]) fillprototype(liblinear.get_labels, None, [POINTER(model), POINTER(c_int)]) fillprototype(liblinear.get_decfun_coef, c_double, [POINTER(model), c_int, c_int]) fillprototype(liblinear.get_decfun_bias, c_double, [POINTER(model), c_int]) fillprototype(liblinear.free_model_content, None, [POINTER(model)]) fillprototype(liblinear.free_and_destroy_model, None, [POINTER(POINTER(model))]) fillprototype(liblinear.destroy_param, None, [POINTER(parameter)]) fillprototype(liblinear.check_parameter, c_char_p, [POINTER(problem), POINTER(parameter)]) fillprototype(liblinear.check_probability_model, c_int, [POINTER(model)]) fillprototype(liblinear.check_regression_model, c_int, [POINTER(model)]) fillprototype(liblinear.set_print_string_function, None, [CFUNCTYPE(None, c_char_p)]) ================================================ FILE: Matlab/liblinear-1.96/python/liblinearutil.py ================================================ #!/usr/bin/env python import os, sys sys.path = [os.path.dirname(os.path.abspath(__file__))] + sys.path from liblinear import * from liblinear import __all__ as liblinear_all from ctypes import c_double __all__ = ['svm_read_problem', 'load_model', 'save_model', 'evaluations', 'train', 'predict'] + liblinear_all def svm_read_problem(data_file_name): """ svm_read_problem(data_file_name) -> [y, x] Read LIBSVM-format data from data_file_name and return labels y and data instances x. """ prob_y = [] prob_x = [] for line in open(data_file_name): line = line.split(None, 1) # In case an instance with all zero features if len(line) == 1: line += [''] label, features = line xi = {} for e in features.split(): ind, val = e.split(":") xi[int(ind)] = float(val) prob_y += [float(label)] prob_x += [xi] return (prob_y, prob_x) def load_model(model_file_name): """ load_model(model_file_name) -> model Load a LIBLINEAR model from model_file_name and return. """ model = liblinear.load_model(model_file_name.encode()) if not model: print("can't open model file %s" % model_file_name) return None model = toPyModel(model) return model def save_model(model_file_name, model): """ save_model(model_file_name, model) -> None Save a LIBLINEAR model to the file model_file_name. """ liblinear.save_model(model_file_name.encode(), model) def evaluations(ty, pv): """ evaluations(ty, pv) -> (ACC, MSE, SCC) Calculate accuracy, mean squared error and squared correlation coefficient using the true values (ty) and predicted values (pv). """ if len(ty) != len(pv): raise ValueError("len(ty) must equal to len(pv)") total_correct = total_error = 0 sumv = sumy = sumvv = sumyy = sumvy = 0 for v, y in zip(pv, ty): if y == v: total_correct += 1 total_error += (v-y)*(v-y) sumv += v sumy += y sumvv += v*v sumyy += y*y sumvy += v*y l = len(ty) ACC = 100.0*total_correct/l MSE = total_error/l try: SCC = ((l*sumvy-sumv*sumy)*(l*sumvy-sumv*sumy))/((l*sumvv-sumv*sumv)*(l*sumyy-sumy*sumy)) except: SCC = float('nan') return (ACC, MSE, SCC) def train(arg1, arg2=None, arg3=None): """ train(y, x [, options]) -> model | ACC train(prob [, options]) -> model | ACC train(prob, param) -> model | ACC Train a model from data (y, x) or a problem prob using 'options' or a parameter param. If '-v' is specified in 'options' (i.e., cross validation) either accuracy (ACC) or mean-squared error (MSE) is returned. options: -s type : set type of solver (default 1) for multi-class classification 0 -- L2-regularized logistic regression (primal) 1 -- L2-regularized L2-loss support vector classification (dual) 2 -- L2-regularized L2-loss support vector classification (primal) 3 -- L2-regularized L1-loss support vector classification (dual) 4 -- support vector classification by Crammer and Singer 5 -- L1-regularized L2-loss support vector classification 6 -- L1-regularized logistic regression 7 -- L2-regularized logistic regression (dual) for regression 11 -- L2-regularized L2-loss support vector regression (primal) 12 -- L2-regularized L2-loss support vector regression (dual) 13 -- L2-regularized L1-loss support vector regression (dual) -c cost : set the parameter C (default 1) -p epsilon : set the epsilon in loss function of SVR (default 0.1) -e epsilon : set tolerance of termination criterion -s 0 and 2 |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2, where f is the primal function, (default 0.01) -s 11 |f'(w)|_2 <= eps*|f'(w0)|_2 (default 0.001) -s 1, 3, 4, and 7 Dual maximal violation <= eps; similar to liblinear (default 0.) -s 5 and 6 |f'(w)|_inf <= eps*min(pos,neg)/l*|f'(w0)|_inf, where f is the primal function (default 0.01) -s 12 and 13 |f'(alpha)|_1 <= eps |f'(alpha0)|, where f is the dual function (default 0.1) -B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1) -wi weight: weights adjust the parameter C of different classes (see README for details) -v n: n-fold cross validation mode -q : quiet mode (no outputs) """ prob, param = None, None if isinstance(arg1, (list, tuple)): assert isinstance(arg2, (list, tuple)) y, x, options = arg1, arg2, arg3 prob = problem(y, x) param = parameter(options) elif isinstance(arg1, problem): prob = arg1 if isinstance(arg2, parameter): param = arg2 else : param = parameter(arg2) if prob == None or param == None : raise TypeError("Wrong types for the arguments") prob.set_bias(param.bias) liblinear.set_print_string_function(param.print_func) err_msg = liblinear.check_parameter(prob, param) if err_msg : raise ValueError('Error: %s' % err_msg) if param.cross_validation: l, nr_fold = prob.l, param.nr_fold target = (c_double * l)() liblinear.cross_validation(prob, param, nr_fold, target) ACC, MSE, SCC = evaluations(prob.y[:l], target[:l]) if param.solver_type in [L2R_L2LOSS_SVR, L2R_L2LOSS_SVR_DUAL, L2R_L1LOSS_SVR_DUAL]: print("Cross Validation Mean squared error = %g" % MSE) print("Cross Validation Squared correlation coefficient = %g" % SCC) return MSE else: print("Cross Validation Accuracy = %g%%" % ACC) return ACC else : m = liblinear.train(prob, param) m = toPyModel(m) return m def predict(y, x, m, options=""): """ predict(y, x, m [, options]) -> (p_labels, p_acc, p_vals) Predict data (y, x) with the SVM model m. options: -b probability_estimates: whether to output probability estimates, 0 or 1 (default 0); currently for logistic regression only -q quiet mode (no outputs) The return tuple contains p_labels: a list of predicted labels p_acc: a tuple including accuracy (for classification), mean-squared error, and squared correlation coefficient (for regression). p_vals: a list of decision values or probability estimates (if '-b 1' is specified). If k is the number of classes, for decision values, each element includes results of predicting k binary-class SVMs. if k = 2 and solver is not MCSVM_CS, only one decision value is returned. For probabilities, each element contains k values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as 'model.label' field in the model structure. """ def info(s): print(s) predict_probability = 0 argv = options.split() i = 0 while i < len(argv): if argv[i] == '-b': i += 1 predict_probability = int(argv[i]) elif argv[i] == '-q': info = print_null else: raise ValueError("Wrong options") i+=1 solver_type = m.param.solver_type nr_class = m.get_nr_class() nr_feature = m.get_nr_feature() is_prob_model = m.is_probability_model() bias = m.bias if bias >= 0: biasterm = feature_node(nr_feature+1, bias) else: biasterm = feature_node(-1, bias) pred_labels = [] pred_values = [] if predict_probability: if not is_prob_model: raise TypeError('probability output is only supported for logistic regression') prob_estimates = (c_double * nr_class)() for xi in x: xi, idx = gen_feature_nodearray(xi, feature_max=nr_feature) xi[-2] = biasterm label = liblinear.predict_probability(m, xi, prob_estimates) values = prob_estimates[:nr_class] pred_labels += [label] pred_values += [values] else: if nr_class <= 2: nr_classifier = 1 else: nr_classifier = nr_class dec_values = (c_double * nr_classifier)() for xi in x: xi, idx = gen_feature_nodearray(xi, feature_max=nr_feature) xi[-2] = biasterm label = liblinear.predict_values(m, xi, dec_values) values = dec_values[:nr_classifier] pred_labels += [label] pred_values += [values] if len(y) == 0: y = [0] * len(x) ACC, MSE, SCC = evaluations(y, pred_labels) l = len(y) if m.is_regression_model(): info("Mean squared error = %g (regression)" % MSE) info("Squared correlation coefficient = %g (regression)" % SCC) else: info("Accuracy = %g%% (%d/%d) (classification)" % (ACC, int(l*ACC/100), l)) return pred_labels, (ACC, MSE, SCC), pred_values ================================================ FILE: Matlab/liblinear-1.96/train.c ================================================ #include #include #include #include #include #include #include "linear.h" #define Malloc(type,n) (type *)malloc((n)*sizeof(type)) #define INF HUGE_VAL void print_null(const char *s) {} void exit_with_help() { printf( "Usage: train [options] training_set_file [model_file]\n" "options:\n" "-s type : set type of solver (default 1)\n" " for multi-class classification\n" " 0 -- L2-regularized logistic regression (primal)\n" " 1 -- L2-regularized L2-loss support vector classification (dual)\n" " 2 -- L2-regularized L2-loss support vector classification (primal)\n" " 3 -- L2-regularized L1-loss support vector classification (dual)\n" " 4 -- support vector classification by Crammer and Singer\n" " 5 -- L1-regularized L2-loss support vector classification\n" " 6 -- L1-regularized logistic regression\n" " 7 -- L2-regularized logistic regression (dual)\n" " for regression\n" " 11 -- L2-regularized L2-loss support vector regression (primal)\n" " 12 -- L2-regularized L2-loss support vector regression (dual)\n" " 13 -- L2-regularized L1-loss support vector regression (dual)\n" "-c cost : set the parameter C (default 1)\n" "-p epsilon : set the epsilon in loss function of SVR (default 0.1)\n" "-e epsilon : set tolerance of termination criterion\n" " -s 0 and 2\n" " |f'(w)|_2 <= eps*min(pos,neg)/l*|f'(w0)|_2,\n" " where f is the primal function and pos/neg are # of\n" " positive/negative data (default 0.01)\n" " -s 11\n" " |f'(w)|_2 <= eps*|f'(w0)|_2 (default 0.001)\n" " -s 1, 3, 4, and 7\n" " Dual maximal violation <= eps; similar to libsvm (default 0.1)\n" " -s 5 and 6\n" " |f'(w)|_1 <= eps*min(pos,neg)/l*|f'(w0)|_1,\n" " where f is the primal function (default 0.01)\n" " -s 12 and 13\n" " |f'(alpha)|_1 <= eps |f'(alpha0)|,\n" " where f is the dual function (default 0.1)\n" "-B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)\n" "-wi weight: weights adjust the parameter C of different classes (see README for details)\n" "-v n: n-fold cross validation mode\n" "-q : quiet mode (no outputs)\n" ); exit(1); } void exit_input_error(int line_num) { fprintf(stderr,"Wrong input format at line %d\n", line_num); exit(1); } static char *line = NULL; static int max_line_len; static char* readline(FILE *input) { int len; if(fgets(line,max_line_len,input) == NULL) return NULL; while(strrchr(line,'\n') == NULL) { max_line_len *= 2; line = (char *) realloc(line,max_line_len); len = (int) strlen(line); if(fgets(line+len,max_line_len-len,input) == NULL) break; } return line; } void parse_command_line(int argc, char **argv, char *input_file_name, char *model_file_name); void read_problem(const char *filename); void do_cross_validation(); struct feature_node *x_space; struct parameter param; struct problem prob; struct model* model_; int flag_cross_validation; int nr_fold; double bias; int main(int argc, char **argv) { char input_file_name[1024]; char model_file_name[1024]; const char *error_msg; parse_command_line(argc, argv, input_file_name, model_file_name); read_problem(input_file_name); error_msg = check_parameter(&prob,¶m); if(error_msg) { fprintf(stderr,"ERROR: %s\n",error_msg); exit(1); } if(flag_cross_validation) { do_cross_validation(); } else { model_=train(&prob, ¶m); if(save_model(model_file_name, model_)) { fprintf(stderr,"can't save model to file %s\n",model_file_name); exit(1); } free_and_destroy_model(&model_); } destroy_param(¶m); free(prob.y); free(prob.x); free(x_space); free(line); return 0; } void do_cross_validation() { int i; int total_correct = 0; double total_error = 0; double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0; double *target = Malloc(double, prob.l); cross_validation(&prob,¶m,nr_fold,target); if(param.solver_type == L2R_L2LOSS_SVR || param.solver_type == L2R_L1LOSS_SVR_DUAL || param.solver_type == L2R_L2LOSS_SVR_DUAL) { for(i=0;i=argc) exit_with_help(); switch(argv[i-1][1]) { case 's': param.solver_type = atoi(argv[i]); break; case 'c': param.C = atof(argv[i]); break; case 'p': param.p = atof(argv[i]); break; case 'e': param.eps = atof(argv[i]); break; case 'B': bias = atof(argv[i]); break; case 'w': ++param.nr_weight; param.weight_label = (int *) realloc(param.weight_label,sizeof(int)*param.nr_weight); param.weight = (double *) realloc(param.weight,sizeof(double)*param.nr_weight); param.weight_label[param.nr_weight-1] = atoi(&argv[i-1][2]); param.weight[param.nr_weight-1] = atof(argv[i]); break; case 'v': flag_cross_validation = 1; nr_fold = atoi(argv[i]); if(nr_fold < 2) { fprintf(stderr,"n-fold cross validation: n must >= 2\n"); exit_with_help(); } break; case 'q': print_func = &print_null; i--; break; default: fprintf(stderr,"unknown option: -%c\n", argv[i-1][1]); exit_with_help(); break; } } set_print_string_function(print_func); // determine filenames if(i>=argc) exit_with_help(); strcpy(input_file_name, argv[i]); if(i max_index) max_index = inst_max_index; if(prob.bias >= 0) x_space[j++].value = prob.bias; x_space[j++].index = -1; } if(prob.bias >= 0) { prob.n=max_index+1; for(i=1;iindex = prob.n; x_space[j-2].index = prob.n; } else prob.n=max_index; fclose(fp); } ================================================ FILE: Matlab/liblinear-1.96/tron.cpp ================================================ #include #include #include #include #include "tron.h" #ifndef min template static inline T min(T x,T y) { return (x static inline T max(T x,T y) { return (x>y)?x:y; } #endif #ifdef __cplusplus extern "C" { #endif extern double dnrm2_(int *, double *, int *); extern double ddot_(int *, double *, int *, double *, int *); extern int daxpy_(int *, double *, double *, int *, double *, int *); extern int dscal_(int *, double *, double *, int *); #ifdef __cplusplus } #endif static void default_print(const char *buf) { fputs(buf,stdout); fflush(stdout); } void TRON::info(const char *fmt,...) { char buf[BUFSIZ]; va_list ap; va_start(ap,fmt); vsprintf(buf,fmt,ap); va_end(ap); (*tron_print_string)(buf); } TRON::TRON(const function *fun_obj, double eps, int max_iter) { this->fun_obj=const_cast(fun_obj); this->eps=eps; this->max_iter=max_iter; tron_print_string = default_print; } TRON::~TRON() { } void TRON::tron(double *w) { // Parameters for updating the iterates. double eta0 = 1e-4, eta1 = 0.25, eta2 = 0.75; // Parameters for updating the trust region size delta. double sigma1 = 0.25, sigma2 = 0.5, sigma3 = 4; int n = fun_obj->get_nr_variable(); int i, cg_iter; double delta, snorm, one=1.0; double alpha, f, fnew, prered, actred, gs; int search = 1, iter = 1, inc = 1; double *s = new double[n]; double *r = new double[n]; double *w_new = new double[n]; double *g = new double[n]; for (i=0; ifun(w); fun_obj->grad(w, g); delta = dnrm2_(&n, g, &inc); double gnorm1 = delta; double gnorm = gnorm1; if (gnorm <= eps*gnorm1) search = 0; iter = 1; while (iter <= max_iter && search) { cg_iter = trcg(delta, g, s, r); memcpy(w_new, w, sizeof(double)*n); daxpy_(&n, &one, s, &inc, w_new, &inc); gs = ddot_(&n, g, &inc, s, &inc); prered = -0.5*(gs-ddot_(&n, s, &inc, r, &inc)); fnew = fun_obj->fun(w_new); // Compute the actual reduction. actred = f - fnew; // On the first iteration, adjust the initial step bound. snorm = dnrm2_(&n, s, &inc); if (iter == 1) delta = min(delta, snorm); // Compute prediction alpha*snorm of the step. if (fnew - f - gs <= 0) alpha = sigma3; else alpha = max(sigma1, -0.5*(gs/(fnew - f - gs))); // Update the trust region bound according to the ratio of actual to predicted reduction. if (actred < eta0*prered) delta = min(max(alpha, sigma1)*snorm, sigma2*delta); else if (actred < eta1*prered) delta = max(sigma1*delta, min(alpha*snorm, sigma2*delta)); else if (actred < eta2*prered) delta = max(sigma1*delta, min(alpha*snorm, sigma3*delta)); else delta = max(delta, min(alpha*snorm, sigma3*delta)); info("iter %2d act %5.3e pre %5.3e delta %5.3e f %5.3e |g| %5.3e CG %3d\n", iter, actred, prered, delta, f, gnorm, cg_iter); if (actred > eta0*prered) { iter++; memcpy(w, w_new, sizeof(double)*n); f = fnew; fun_obj->grad(w, g); gnorm = dnrm2_(&n, g, &inc); if (gnorm <= eps*gnorm1) break; } if (f < -1.0e+32) { info("WARNING: f < -1.0e+32\n"); break; } if (fabs(actred) <= 0 && prered <= 0) { info("WARNING: actred and prered <= 0\n"); break; } if (fabs(actred) <= 1.0e-12*fabs(f) && fabs(prered) <= 1.0e-12*fabs(f)) { info("WARNING: actred and prered too small\n"); break; } } delete[] g; delete[] r; delete[] w_new; delete[] s; } int TRON::trcg(double delta, double *g, double *s, double *r) { int i, inc = 1; int n = fun_obj->get_nr_variable(); double one = 1; double *d = new double[n]; double *Hd = new double[n]; double rTr, rnewTrnew, alpha, beta, cgtol; for (i=0; iHv(d, Hd); alpha = rTr/ddot_(&n, d, &inc, Hd, &inc); daxpy_(&n, &alpha, d, &inc, s, &inc); if (dnrm2_(&n, s, &inc) > delta) { info("cg reaches trust region boundary\n"); alpha = -alpha; daxpy_(&n, &alpha, d, &inc, s, &inc); double std = ddot_(&n, s, &inc, d, &inc); double sts = ddot_(&n, s, &inc, s, &inc); double dtd = ddot_(&n, d, &inc, d, &inc); double dsq = delta*delta; double rad = sqrt(std*std + dtd*(dsq-sts)); if (std >= 0) alpha = (dsq - sts)/(std + rad); else alpha = (rad - std)/dtd; daxpy_(&n, &alpha, d, &inc, s, &inc); alpha = -alpha; daxpy_(&n, &alpha, Hd, &inc, r, &inc); break; } alpha = -alpha; daxpy_(&n, &alpha, Hd, &inc, r, &inc); rnewTrnew = ddot_(&n, r, &inc, r, &inc); beta = rnewTrnew/rTr; dscal_(&n, &beta, d, &inc); daxpy_(&n, &one, r, &inc, d, &inc); rTr = rnewTrnew; } delete[] d; delete[] Hd; return(cg_iter); } double TRON::norm_inf(int n, double *x) { double dmax = fabs(x[0]); for (int i=1; i= dmax) dmax = fabs(x[i]); return(dmax); } void TRON::set_print_string(void (*print_string) (const char *buf)) { tron_print_string = print_string; } ================================================ FILE: Matlab/liblinear-1.96/tron.h ================================================ #ifndef _TRON_H #define _TRON_H class function { public: virtual double fun(double *w) = 0 ; virtual void grad(double *w, double *g) = 0 ; virtual void Hv(double *s, double *Hs) = 0 ; virtual int get_nr_variable(void) = 0 ; virtual ~function(void){} }; class TRON { public: TRON(const function *fun_obj, double eps = 0.1, int max_iter = 1000); ~TRON(); void tron(double *w); void set_print_string(void (*i_print) (const char *buf)); private: int trcg(double delta, double *g, double *s, double *r); double norm_inf(int n, double *x); double eps; int max_iter; function *fun_obj; void info(const char *fmt,...); void (*tron_print_string)(const char *buf); }; #endif ================================================ FILE: Matlab/libsvm-3.19/COPYRIGHT ================================================ Copyright (c) 2000-2014 Chih-Chung Chang and Chih-Jen Lin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither name of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: Matlab/libsvm-3.19/FAQ.html ================================================ LIBSVM FAQ

LIBSVM FAQ

last modified : Thu, 20 Mar 2014 16:05:14 GMT
  • All Questions(81)

  • Q: Some courses which have used libsvm as a tool

    [Go Top]


    Q: Some applications/tools which have used libsvm
    (and maybe liblinear).

    [Go Top]


    Q: Where can I find documents/videos of libsvm ?

    • Official implementation document:
      C.-C. Chang and C.-J. Lin. LIBSVM : a library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1--27:27, 2011. pdf, ps.gz, ACM digital lib.
    • Instructions for using LIBSVM are in the README files in the main directory and some sub-directories.
      README in the main directory: details all options, data format, and library calls.
      tools/README: parameter selection and other tools
    • A guide for beginners:
      C.-W. Hsu, C.-C. Chang, and C.-J. Lin. A practical guide to support vector classification
    • An introductory video for windows users.

    [Go Top]


    Q: Where are change log and earlier versions?

    See the change log.

    You can download earlier versions here.

    [Go Top]


    Q: How to cite LIBSVM?

    Please cite the following paper:

    Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1--27:27, 2011. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm

    The bibtex format is

    @article{CC01a,
     author = {Chang, Chih-Chung and Lin, Chih-Jen},
     title = {{LIBSVM}: A library for support vector machines},
     journal = {ACM Transactions on Intelligent Systems and Technology},
     volume = {2},
     issue = {3},
     year = {2011},
     pages = {27:1--27:27},
     note =	 {Software available at \url{http://www.csie.ntu.edu.tw/~cjlin/libsvm}}
    }
    

    [Go Top]


    Q: I would like to use libsvm in my software. Is there any license problem?

    The libsvm license ("the modified BSD license") is compatible with many free software licenses such as GPL. Hence, it is very easy to use libsvm in your software. Please check the COPYRIGHT file in detail. Basically you need to

    1. Clearly indicate that LIBSVM is used.
    2. Retain the LIBSVM COPYRIGHT file in your software.
    It can also be used in commercial products.

    [Go Top]


    Q: Is there a repository of additional tools based on libsvm?

    Yes, see libsvm tools

    [Go Top]


    Q: On unix machines, I got "error in loading shared libraries" or "cannot open shared object file." What happened ?

    This usually happens if you compile the code on one machine and run it on another which has incompatible libraries. Try to recompile the program on that machine or use static linking.

    [Go Top]


    Q: I have modified the source and would like to build the graphic interface "svm-toy" on MS windows. How should I do it ?

    Build it as a project by choosing "Win32 Project." On the other hand, for "svm-train" and "svm-predict" you want to choose "Win32 Console Project." After libsvm 2.5, you can also use the file Makefile.win. See details in README.

    If you are not using Makefile.win and see the following link error

    LIBCMTD.lib(wwincrt0.obj) : error LNK2001: unresolved external symbol
    _wWinMain@16
    
    you may have selected a wrong project type.

    [Go Top]


    Q: I am an MS windows user but why only one (svm-toy) of those precompiled .exe actually runs ?

    You need to open a command window and type svmtrain.exe to see all options. Some examples are in README file.

    [Go Top]


    Q: What is the difference between "." and "*" outputed during training?

    "." means every 1,000 iterations (or every #data iterations is your #data is less than 1,000). "*" means that after iterations of using a smaller shrunk problem, we reset to use the whole set. See the implementation document for details.

    [Go Top]


    Q: Why occasionally the program (including MATLAB or other interfaces) crashes and gives a segmentation fault?

    Very likely the program consumes too much memory than what the operating system can provide. Try a smaller data and see if the program still crashes.

    [Go Top]


    Q: How to build a dynamic library (.dll file) on MS windows?

    The easiest way is to use Makefile.win. See details in README. Alternatively, you can use Visual C++. Here is the example using Visual Studio .Net 2008:

    1. Create a Win32 empty DLL project and set (in Project->$Project_Name Properties...->Configuration) to "Release." About how to create a new dynamic link library, please refer to http://msdn2.microsoft.com/en-us/library/ms235636(VS.80).aspx
    2. Add svm.cpp, svm.h to your project.
    3. Add __WIN32__ and _CRT_SECURE_NO_DEPRECATE to Preprocessor definitions (in Project->$Project_Name Properties...->C/C++->Preprocessor)
    4. Set Create/Use Precompiled Header to Not Using Precompiled Headers (in Project->$Project_Name Properties...->C/C++->Precompiled Headers)
    5. Set the path for the Modulation Definition File svm.def (in Project->$Project_Name Properties...->Linker->input
    6. Build the DLL.
    7. Rename the dll file to libsvm.dll and move it to the correct path.

    [Go Top]


    Q: On some systems (e.g., Ubuntu), compiling LIBSVM gives many warning messages. Is this a problem and how to disable the warning message?

    If you are using a version before 3.18, probably you see a warning message like

    svm.cpp:2730: warning: ignoring return value of int fscanf(FILE*, const char*, ...), declared with attribute warn_unused_result
    
    This is not a problem; see this page for more details of ubuntu systems. To disable the warning message you can replace
    CFLAGS = -Wall -Wconversion -O3 -fPIC
    
    with
    CFLAGS = -Wall -Wconversion -O3 -fPIC -U_FORTIFY_SOURCE
    
    in Makefile.

    After version 3.18, we have a better setting so that such warning messages do not appear.

    [Go Top]


    Q: In LIBSVM, why you don't use certain C/C++ library functions to make the code shorter?

    For portability, we use only features defined in ISO C89. Note that features in ISO C99 may not be available everywhere. Even the newest gcc lacks some features in C99 (see http://gcc.gnu.org/c99status.html for details). If the situation changes in the future, we might consider using these newer features.

    [Go Top]


    Q: Why sometimes not all attributes of a data appear in the training/model files ?

    libsvm uses the so called "sparse" format where zero values do not need to be stored. Hence a data with attributes

    1 0 2 0
    
    is represented as
    1:1 3:2
    

    [Go Top]


    Q: What if my data are non-numerical ?

    Currently libsvm supports only numerical data. You may have to change non-numerical data to numerical. For example, you can use several binary attributes to represent a categorical attribute.

    [Go Top]


    Q: Why do you consider sparse format ? Will the training of dense data be much slower ?

    This is a controversial issue. The kernel evaluation (i.e. inner product) of sparse vectors is slower so the total training time can be at least twice or three times of that using the dense format. However, we cannot support only dense format as then we CANNOT handle extremely sparse cases. Simplicity of the code is another concern. Right now we decide to support the sparse format only.

    [Go Top]


    Q: Why sometimes the last line of my data is not read by svm-train?

    We assume that you have '\n' in the end of each line. So please press enter in the end of your last line.

    [Go Top]


    Q: Is there a program to check if my data are in the correct format?

    The svm-train program in libsvm conducts only a simple check of the input data. To do a detailed check, after libsvm 2.85, you can use the python script tools/checkdata.py. See tools/README for details.

    [Go Top]


    Q: May I put comments in data files?

    We don't officially support this. But, currently LIBSVM is able to process data in the following format:

    1 1:2 2:1 # your comments
    
    Note that the character ":" should not appear in your comments.

    [Go Top]


    Q: How to convert other data formats to LIBSVM format?

    It depends on your data format. A simple way is to use libsvmwrite in the libsvm matlab/octave interface. Take a CSV (comma-separated values) file in UCI machine learning repository as an example. We download SPECTF.train. Labels are in the first column. The following steps produce a file in the libsvm format.

    matlab> SPECTF = csvread('SPECTF.train'); % read a csv file
    matlab> labels = SPECTF(:, 1); % labels from the 1st column
    matlab> features = SPECTF(:, 2:end); 
    matlab> features_sparse = sparse(features); % features must be in a sparse matrix
    matlab> libsvmwrite('SPECTFlibsvm.train', labels, features_sparse);
    
    The tranformed data are stored in SPECTFlibsvm.train.

    Alternatively, you can use convert.c to convert CSV format to libsvm format.

    [Go Top]


    Q: The output of training C-SVM is like the following. What do they mean?

    optimization finished, #iter = 219
    nu = 0.431030
    obj = -100.877286, rho = 0.424632
    nSV = 132, nBSV = 107
    Total nSV = 132

    obj is the optimal objective value of the dual SVM problem. rho is the bias term in the decision function sgn(w^Tx - rho). nSV and nBSV are number of support vectors and bounded support vectors (i.e., alpha_i = C). nu-svm is a somewhat equivalent form of C-SVM where C is replaced by nu. nu simply shows the corresponding parameter. More details are in libsvm document.

    [Go Top]


    Q: Can you explain more about the model file?

    In the model file, after parameters and other informations such as labels , each line represents a support vector. Support vectors are listed in the order of "labels" shown earlier. (i.e., those from the first class in the "labels" list are grouped first, and so on.) If k is the total number of classes, in front of a support vector in class j, there are k-1 coefficients y*alpha where alpha are dual solution of the following two class problems:
    1 vs j, 2 vs j, ..., j-1 vs j, j vs j+1, j vs j+2, ..., j vs k
    and y=1 in first j-1 coefficients, y=-1 in the remaining k-j coefficients. For example, if there are 4 classes, the file looks like:

    +-+-+-+--------------------+
    |1|1|1|                    |
    |v|v|v|  SVs from class 1  |
    |2|3|4|                    |
    +-+-+-+--------------------+
    |1|2|2|                    |
    |v|v|v|  SVs from class 2  |
    |2|3|4|                    |
    +-+-+-+--------------------+
    |1|2|3|                    |
    |v|v|v|  SVs from class 3  |
    |3|3|4|                    |
    +-+-+-+--------------------+
    |1|2|3|                    |
    |v|v|v|  SVs from class 4  |
    |4|4|4|                    |
    +-+-+-+--------------------+
    
    See also an illustration using MATLAB/OCTAVE.

    [Go Top]


    Q: Should I use float or double to store numbers in the cache ?

    We have float as the default as you can store more numbers in the cache. In general this is good enough but for few difficult cases (e.g. C very very large) where solutions are huge numbers, it might be possible that the numerical precision is not enough using only float.

    [Go Top]


    Q: Does libsvm have special treatments for linear SVM?

    No, libsvm solves linear/nonlinear SVMs by the same way. Some tricks may save training/testing time if the linear kernel is used, so libsvm is NOT particularly efficient for linear SVM, especially when C is large and the number of data is much larger than the number of attributes. You can either

    Please also see our SVM guide on the discussion of using RBF and linear kernels.

    [Go Top]


    Q: The number of free support vectors is large. What should I do?

    This usually happens when the data are overfitted. If attributes of your data are in large ranges, try to scale them. Then the region of appropriate parameters may be larger. Note that there is a scale program in libsvm.

    [Go Top]


    Q: Should I scale training and testing data in a similar way?

    Yes, you can do the following:

    > svm-scale -s scaling_parameters train_data > scaled_train_data
    > svm-scale -r scaling_parameters test_data > scaled_test_data
    

    [Go Top]


    Q: Does it make a big difference if I scale each attribute to [0,1] instead of [-1,1]?

    For the linear scaling method, if the RBF kernel is used and parameter selection is conducted, there is no difference. Assume Mi and mi are respectively the maximal and minimal values of the ith attribute. Scaling to [0,1] means

                    x'=(x-mi)/(Mi-mi)
    
    For [-1,1],
                    x''=2(x-mi)/(Mi-mi)-1.
    
    In the RBF kernel,
                    x'-y'=(x-y)/(Mi-mi), x''-y''=2(x-y)/(Mi-mi).
    
    Hence, using (C,g) on the [0,1]-scaled data is the same as (C,g/2) on the [-1,1]-scaled data.

    Though the performance is the same, the computational time may be different. For data with many zero entries, [0,1]-scaling keeps the sparsity of input data and hence may save the time.

    [Go Top]


    Q: The prediction rate is low. How could I improve it?

    Try to use the model selection tool grid.py in the tools directory find out good parameters. To see the importance of model selection, please see our guide for beginners: A practical guide to support vector classification

    [Go Top]


    Q: My data are unbalanced. Could libsvm handle such problems?

    Yes, there is a -wi options. For example, if you use

    > svm-train -s 0 -c 10 -w1 1 -w-1 5 data_file
    

    the penalty for class "-1" is larger. Note that this -w option is for C-SVC only.

    [Go Top]


    Q: What is the difference between nu-SVC and C-SVC?

    Basically they are the same thing but with different parameters. The range of C is from zero to infinity but nu is always between [0,1]. A nice property of nu is that it is related to the ratio of support vectors and the ratio of the training error.

    [Go Top]


    Q: The program keeps running (without showing any output). What should I do?

    You may want to check your data. Each training/testing data must be in one line. It cannot be separated. In addition, you have to remove empty lines.

    [Go Top]


    Q: The program keeps running (with output, i.e. many dots). What should I do?

    In theory libsvm guarantees to converge. Therefore, this means you are handling ill-conditioned situations (e.g. too large/small parameters) so numerical difficulties occur.

    You may get better numerical stability by replacing

    typedef float Qfloat;
    
    in svm.cpp with
    typedef double Qfloat;
    
    That is, elements in the kernel cache are stored in double instead of single. However, this means fewer elements can be put in the kernel cache.

    [Go Top]


    Q: The training time is too long. What should I do?

    For large problems, please specify enough cache size (i.e., -m). Slow convergence may happen for some difficult cases (e.g. -c is large). You can try to use a looser stopping tolerance with -e. If that still doesn't work, you may train only a subset of the data. You can use the program subset.py in the directory "tools" to obtain a random subset.

    If you have extremely large data and face this difficulty, please contact us. We will be happy to discuss possible solutions.

    When using large -e, you may want to check if -h 0 (no shrinking) or -h 1 (shrinking) is faster. See a related question below.

    [Go Top]


    Q: Does shrinking always help?

    If the number of iterations is high, then shrinking often helps. However, if the number of iterations is small (e.g., you specify a large -e), then probably using -h 0 (no shrinking) is better. See the implementation document for details.

    [Go Top]


    Q: How do I get the decision value(s)?

    We print out decision values for regression. For classification, we solve several binary SVMs for multi-class cases. You can obtain values by easily calling the subroutine svm_predict_values. Their corresponding labels can be obtained from svm_get_labels. Details are in README of libsvm package.

    If you are using MATLAB/OCTAVE interface, svmpredict can directly give you decision values. Please see matlab/README for details.

    We do not recommend the following. But if you would like to get values for TWO-class classification with labels +1 and -1 (note: +1 and -1 but not things like 5 and 10) in the easiest way, simply add

    		printf("%f\n", dec_values[0]*model->label[0]);
    
    after the line
    		svm_predict_values(model, x, dec_values);
    
    of the file svm.cpp. Positive (negative) decision values correspond to data predicted as +1 (-1).

    [Go Top]


    Q: How do I get the distance between a point and the hyperplane?

    The distance is |decision_value| / |w|. We have |w|^2 = w^Tw = alpha^T Q alpha = 2*(dual_obj + sum alpha_i). Thus in svm.cpp please find the place where we calculate the dual objective value (i.e., the subroutine Solve()) and add a statement to print w^Tw.

    [Go Top]


    Q: On 32-bit machines, if I use a large cache (i.e. large -m) on a linux machine, why sometimes I get "segmentation fault ?"

    On 32-bit machines, the maximum addressable memory is 4GB. The Linux kernel uses 3:1 split which means user space is 3G and kernel space is 1G. Although there are 3G user space, the maximum dynamic allocation memory is 2G. So, if you specify -m near 2G, the memory will be exhausted. And svm-train will fail when it asks more memory. For more details, please read this article.

    The easiest solution is to switch to a 64-bit machine. Otherwise, there are two ways to solve this. If your machine supports Intel's PAE (Physical Address Extension), you can turn on the option HIGHMEM64G in Linux kernel which uses 4G:4G split for kernel and user space. If you don't, you can try a software `tub' which can eliminate the 2G boundary for dynamic allocated memory. The `tub' is available at http://www.bitwagon.com/tub.html.

    [Go Top]


    Q: How do I disable screen output of svm-train?

    For commend-line users, use the -q option:

    > ./svm-train -q heart_scale
    

    For library users, set the global variable

    extern void (*svm_print_string) (const char *);
    
    to specify the output format. You can disable the output by the following steps:
    1. Declare a function to output nothing:
      void print_null(const char *s) {}
      
    2. Assign the output function of libsvm by
      svm_print_string = &print_null;
      
    Finally, a way used in earlier libsvm is by updating svm.cpp from
    #if 1
    void info(const char *fmt,...)
    
    to
    #if 0
    void info(const char *fmt,...)
    

    [Go Top]


    Q: I would like to use my own kernel. Any example? In svm.cpp, there are two subroutines for kernel evaluations: k_function() and kernel_function(). Which one should I modify ?

    An example is "LIBSVM for string data" in LIBSVM Tools.

    The reason why we have two functions is as follows. For the RBF kernel exp(-g |xi - xj|^2), if we calculate xi - xj first and then the norm square, there are 3n operations. Thus we consider exp(-g (|xi|^2 - 2dot(xi,xj) +|xj|^2)) and by calculating all |xi|^2 in the beginning, the number of operations is reduced to 2n. This is for the training. For prediction we cannot do this so a regular subroutine using that 3n operations is needed. The easiest way to have your own kernel is to put the same code in these two subroutines by replacing any kernel.

    [Go Top]


    Q: What method does libsvm use for multi-class SVM ? Why don't you use the "1-against-the rest" method?

    It is one-against-one. We chose it after doing the following comparison: C.-W. Hsu and C.-J. Lin. A comparison of methods for multi-class support vector machines , IEEE Transactions on Neural Networks, 13(2002), 415-425.

    "1-against-the rest" is a good method whose performance is comparable to "1-against-1." We do the latter simply because its training time is shorter.

    [Go Top]


    Q: I would like to solve L2-loss SVM (i.e., error term is quadratic). How should I modify the code ?

    It is extremely easy. Taking c-svc for example, to solve

    min_w w^Tw/2 + C \sum max(0, 1- (y_i w^Tx_i+b))^2,

    only two places of svm.cpp have to be changed. First, modify the following line of solve_c_svc from

    	s.Solve(l, SVC_Q(*prob,*param,y), minus_ones, y,
    		alpha, Cp, Cn, param->eps, si, param->shrinking);
    
    to
    	s.Solve(l, SVC_Q(*prob,*param,y), minus_ones, y,
    		alpha, INF, INF, param->eps, si, param->shrinking);
    
    Second, in the class of SVC_Q, declare C as a private variable:
    	double C;
    
    In the constructor replace
    	for(int i=0;i<prob.l;i++)
    		QD[i]= (Qfloat)(this->*kernel_function)(i,i);
    
    with
            this->C = param.C;
    	for(int i=0;i<prob.l;i++)
    		QD[i]= (Qfloat)(this->*kernel_function)(i,i)+0.5/C;
    
    Then in the subroutine get_Q, after the for loop, add
            if(i >= start && i < len) 
    		data[i] += 0.5/C;
    

    For one-class svm, the modification is exactly the same. For SVR, you don't need an if statement like the above. Instead, you only need a simple assignment:

    	data[real_i] += 0.5/C;
    

    For large linear L2-loss SVM, please use LIBLINEAR.

    [Go Top]


    Q: In one-class SVM, parameter nu should be an upper bound of the training error rate. Why sometimes I get a training error rate bigger than nu?

    At optimum, some training instances should satisfy w^Tx - rho = 0. However, numerically they may be slightly smaller than zero Then they are wrongly counted as training errors. You can use a smaller stopping tolerance (by the -e option) to make this problem less serious.

    This issue does not occur for nu-SVC for two-class classification. We have that

    1. nu is an upper bound on the ratio of training points on the wrong side of the hyperplane, and
    2. therefore, nu is also an upper bound on the training error rate.
    Numerical issues occur in calculating the first case because some training points satisfying y(w^Tx + b) - rho = 0 become negative. However, we have no numerical problems for the second case because we compare y(w^Tx + b) and 0 for counting training errors.

    [Go Top]


    Q: Why the code gives NaN (not a number) results?

    This rarely happens, but few users reported the problem. It seems that their computers for training libsvm have the VPN client running. The VPN software has some bugs and causes this problem. Please try to close or disconnect the VPN client.

    [Go Top]


    Q: Why the sign of predicted labels and decision values are sometimes reversed?

    This situation may occur before version 3.17. Nothing is wrong. Very likely you have two labels +1/-1 and the first instance in your data has -1. We give the following explanation.

    Internally class labels are ordered by their first occurrence in the training set. For a k-class data, internally labels are 0, ..., k-1, and each two-class SVM considers pair (i, j) with i < j. Then class i is treated as positive (+1) and j as negative (-1). For example, if the data set has labels +5/+10 and +10 appears first, then internally the +5 versus +10 SVM problem has +10 as positive (+1) and +5 as negative (-1).

    By this setting, if you have labels +1 and -1, it's possible that internally they correspond to -1 and +1, respectively. Some new users have been confused about this, so after version 3.17, if the data set has only two labels +1 and -1, internally we ensure +1 to be before -1. Then class +1 is always treated as positive in the SVM problem. Note that this is for two-class data only.

    [Go Top]


    Q: I don't know class labels of test data. What should I put in the first column of the test file?

    Any value is ok. In this situation, what you will use is the output file of svm-predict, which gives predicted class labels.

    [Go Top]


    Q: How can I use OpenMP to parallelize LIBSVM on a multicore/shared-memory computer?

    It is very easy if you are using GCC 4.2 or after.

    In Makefile, add -fopenmp to CFLAGS.

    In class SVC_Q of svm.cpp, modify the for loop of get_Q to:

    #pragma omp parallel for private(j) 
    			for(j=start;j<len;j++)
    

    In the subroutine svm_predict_values of svm.cpp, add one line to the for loop:

    #pragma omp parallel for private(i) 
    		for(i=0;i<l;i++)
    			kvalue[i] = Kernel::k_function(x,model->SV[i],model->param);
    
    For regression, you need to modify class SVR_Q instead. The loop in svm_predict_values is also different because you need a reduction clause for the variable sum:
    #pragma omp parallel for private(i) reduction(+:sum) 
    		for(i=0;i<model->l;i++)
    			sum += sv_coef[i] * Kernel::k_function(x,model->SV[i],model->param);
    

    Then rebuild the package. Kernel evaluations in training/testing will be parallelized. An example of running this modification on an 8-core machine using the data set ijcnn1:

    8 cores:

    %setenv OMP_NUM_THREADS 8
    %time svm-train -c 16 -g 4 -m 400 ijcnn1
    27.1sec
    
    1 core:
    %setenv OMP_NUM_THREADS 1
    %time svm-train -c 16 -g 4 -m 400 ijcnn1
    79.8sec
    
    For this data, kernel evaluations take 80% of training time. In the above example, we assume you use csh. For bash, use
    export OMP_NUM_THREADS=8
    
    instead.

    For Python interface, you need to add the -lgomp link option:

    $(CXX) -lgomp -shared -dynamiclib svm.o -o libsvm.so.$(SHVER)
    

    For MS Windows, you need to add /openmp in CFLAGS of Makefile.win

    [Go Top]


    Q: How could I know which training instances are support vectors?

    It's very simple. Since version 3.13, you can use the function

    void svm_get_sv_indices(const struct svm_model *model, int *sv_indices)
    
    to get indices of support vectors. For example, in svm-train.c, after
    		model = svm_train(&prob, &param);
    
    you can add
    		int nr_sv = svm_get_nr_sv(model);
    		int *sv_indices = Malloc(int, nr_sv);
    		svm_get_sv_indices(model, sv_indices);
    		for (int i=0; i<nr_sv; i++)
    			printf("instance %d is a support vector\n", sv_indices[i]);
    

    If you use matlab interface, you can directly check

    model.sv_indices
    

    [Go Top]


    Q: Why sv_indices (indices of support vectors) are not stored in the saved model file?

    Although sv_indices is a member of the model structure to indicate support vectors in the training set, we do not store its contents in the model file. The model file is mainly used in the future for prediction, so it is basically independent from training data. Thus storing sv_indices is not necessary. Users should find support vectors right after the training process. See the previous FAQ.

    [Go Top]


    Q: After doing cross validation, why there is no model file outputted ?

    Cross validation is used for selecting good parameters. After finding them, you want to re-train the whole data without the -v option.

    [Go Top]


    Q: Why my cross-validation results are different from those in the Practical Guide?

    Due to random partitions of the data, on different systems CV accuracy values may be different.

    [Go Top]


    Q: On some systems CV accuracy is the same in several runs. How could I use different data partitions? In other words, how do I set random seed in LIBSVM?

    If you use GNU C library, the default seed 1 is considered. Thus you always get the same result of running svm-train -v. To have different seeds, you can add the following code in svm-train.c:

    #include <time.h>
    
    and in the beginning of main(),
    srand(time(0));
    
    Alternatively, if you are not using GNU C library and would like to use a fixed seed, you can have
    srand(1);
    

    For Java, the random number generator is initialized using the time information. So results of two CV runs are different. To fix the seed, after version 3.1 (released in mid 2011), you can add

    svm.rand.setSeed(0);
    
    in the main() function of svm_train.java.

    If you use CV to select parameters, it is recommended to use identical folds under different parameters. In this case, you can consider fixing the seed.

    [Go Top]


    Q: Why on windows sometimes grid.py fails?

    This problem shouldn't happen after version 2.85. If you are using earlier versions, please download the latest one.

    [Go Top]


    Q: Why grid.py/easy.py sometimes generates the following warning message?
    Warning: empty z range [62.5:62.5], adjusting to [61.875:63.125]
    Notice: cannot contour non grid data!
    

    Nothing is wrong and please disregard the message. It is from gnuplot when drawing the contour.

    [Go Top]


    Q: How do I choose the kernel?

    In general we suggest you to try the RBF kernel first. A recent result by Keerthi and Lin ( download paper here) shows that if RBF is used with model selection, then there is no need to consider the linear kernel. The kernel matrix using sigmoid may not be positive definite and in general it's accuracy is not better than RBF. (see the paper by Lin and Lin ( download paper here). Polynomial kernels are ok but if a high degree is used, numerical difficulties tend to happen (thinking about dth power of (<1) goes to 0 and (>1) goes to infinity).

    [Go Top]


    Q: How does LIBSVM perform parameter selection for multi-class problems?

    LIBSVM implements "one-against-one" multi-class method, so there are k(k-1)/2 binary models, where k is the number of classes.

    We can consider two ways to conduct parameter selection.

    1. For any two classes of data, a parameter selection procedure is conducted. Finally, each decision function has its own optimal parameters.
    2. The same parameters are used for all k(k-1)/2 binary classification problems. We select parameters that achieve the highest overall performance.
    Each has its own advantages. A single parameter set may not be uniformly good for all k(k-1)/2 decision functions. However, as the overall accuracy is the final consideration, one parameter set for one decision function may lead to over-fitting. In the paper

    Chen, Lin, and Schölkopf, A tutorial on nu-support vector machines. Applied Stochastic Models in Business and Industry, 21(2005), 111-136,

    they have experimentally shown that the two methods give similar performance. Therefore, currently the parameter selection in LIBSVM takes the second approach by considering the same parameters for all k(k-1)/2 models.

    [Go Top]


    Q: How do I choose parameters for one-class SVM as training data are in only one class?

    You have pre-specified true positive rate in mind and then search for parameters which achieve similar cross-validation accuracy.

    [Go Top]


    Q: Why training a probability model (i.e., -b 1) takes a longer time?

    To construct this probability model, we internally conduct a cross validation, which is more time consuming than a regular training. Hence, in general you do parameter selection first without -b 1. You only use -b 1 when good parameters have been selected. In other words, you avoid using -b 1 and -v together.

    [Go Top]


    Q: Why using the -b option does not give me better accuracy?

    There is absolutely no reason the probability outputs guarantee you better accuracy. The main purpose of this option is to provide you the probability estimates, but not to boost prediction accuracy. From our experience, after proper parameter selections, in general with and without -b have similar accuracy. Occasionally there are some differences. It is not recommended to compare the two under just a fixed parameter set as more differences will be observed.

    [Go Top]


    Q: Why using svm-predict -b 0 and -b 1 gives different accuracy values?

    Let's just consider two-class classification here. After probability information is obtained in training, we do not have

    prob > = 0.5 if and only if decision value >= 0.

    So predictions may be different with -b 0 and 1.

    [Go Top]


    Q: How can I save images drawn by svm-toy?

    For Microsoft windows, first press the "print screen" key on the keyboard. Open "Microsoft Paint" (included in Windows) and press "ctrl-v." Then you can clip the part of picture which you want. For X windows, you can use the program "xv" or "import" to grab the picture of the svm-toy window.

    [Go Top]


    Q: I press the "load" button to load data points but why svm-toy does not draw them ?

    The program svm-toy assumes both attributes (i.e. x-axis and y-axis values) are in (0,1). Hence you want to scale your data to between a small positive number and a number less than but very close to 1. Moreover, class labels must be 1, 2, or 3 (not 1.0, 2.0 or anything else).

    [Go Top]


    Q: I would like svm-toy to handle more than three classes of data, what should I do ?

    Taking windows/svm-toy.cpp as an example, you need to modify it and the difference from the original file is as the following: (for five classes of data)

    30,32c30
    < 	RGB(200,0,200),
    < 	RGB(0,160,0),
    < 	RGB(160,0,0)
    ---
    > 	RGB(200,0,200)
    39c37
    < HBRUSH brush1, brush2, brush3, brush4, brush5;
    ---
    > HBRUSH brush1, brush2, brush3;
    113,114d110
    < 	brush4 = CreateSolidBrush(colors[7]);
    < 	brush5 = CreateSolidBrush(colors[8]);
    155,157c151
    < 	else if(v==3) return brush3;
    < 	else if(v==4) return brush4;
    < 	else return brush5;
    ---
    > 	else return brush3;
    325d318
    < 	  int colornum = 5;
    327c320
    < 		svm_node *x_space = new svm_node[colornum * prob.l];
    ---
    > 		svm_node *x_space = new svm_node[3 * prob.l];
    333,338c326,331
    < 			x_space[colornum * i].index = 1;
    < 			x_space[colornum * i].value = q->x;
    < 			x_space[colornum * i + 1].index = 2;
    < 			x_space[colornum * i + 1].value = q->y;
    < 			x_space[colornum * i + 2].index = -1;
    < 			prob.x[i] = &x_space[colornum * i];
    ---
    > 			x_space[3 * i].index = 1;
    > 			x_space[3 * i].value = q->x;
    > 			x_space[3 * i + 1].index = 2;
    > 			x_space[3 * i + 1].value = q->y;
    > 			x_space[3 * i + 2].index = -1;
    > 			prob.x[i] = &x_space[3 * i];
    397c390
    < 				if(current_value > 5) current_value = 1;
    ---
    > 				if(current_value > 3) current_value = 1;
    

    [Go Top]


    Q: What is the difference between Java version and C++ version of libsvm?

    They are the same thing. We just rewrote the C++ code in Java.

    [Go Top]


    Q: Is the Java version significantly slower than the C++ version?

    This depends on the VM you used. We have seen good VM which leads the Java version to be quite competitive with the C++ code. (though still slower)

    [Go Top]


    Q: While training I get the following error message: java.lang.OutOfMemoryError. What is wrong?

    You should try to increase the maximum Java heap size. For example,

    java -Xmx2048m -classpath libsvm.jar svm_train ...
    
    sets the maximum heap size to 2048M.

    [Go Top]


    Q: Why you have the main source file svm.m4 and then transform it to svm.java?

    Unlike C, Java does not have a preprocessor built-in. However, we need some macros (see first 3 lines of svm.m4).

    [Go Top]


    Q: Except the python-C++ interface provided, could I use Jython to call libsvm ?

    Yes, here are some examples:

    $ export CLASSPATH=$CLASSPATH:~/libsvm-2.91/java/libsvm.jar
    $ ./jython
    Jython 2.1a3 on java1.3.0 (JIT: jitc)
    Type "copyright", "credits" or "license" for more information.
    >>> from libsvm import *
    >>> dir()
    ['__doc__', '__name__', 'svm', 'svm_model', 'svm_node', 'svm_parameter',
    'svm_problem']
    >>> x1 = [svm_node(index=1,value=1)]
    >>> x2 = [svm_node(index=1,value=-1)]
    >>> param = svm_parameter(svm_type=0,kernel_type=2,gamma=1,cache_size=40,eps=0.001,C=1,nr_weight=0,shrinking=1)
    >>> prob = svm_problem(l=2,y=[1,-1],x=[x1,x2])
    >>> model = svm.svm_train(prob,param)
    *
    optimization finished, #iter = 1
    nu = 1.0
    obj = -1.018315639346838, rho = 0.0
    nSV = 2, nBSV = 2
    Total nSV = 2
    >>> svm.svm_predict(model,x1)
    1.0
    >>> svm.svm_predict(model,x2)
    -1.0
    >>> svm.svm_save_model("test.model",model)
    
    

    [Go Top]


    Q: I compile the MATLAB interface without problem, but why errors occur while running it?

    Your compiler version may not be supported/compatible for MATLAB. Please check this MATLAB page first and then specify the version number. For example, if g++ X.Y is supported, replace

    CXX = g++
    
    in the Makefile with
    CXX = g++-X.Y
    

    [Go Top]


    Q: On 64bit Windows I compile the MATLAB interface without problem, but why errors occur while running it?

    Please make sure that you use the -largeArrayDims option in make.m. For example,

    mex -largeArrayDims -O -c svm.cpp
    
    Moreover, if you use Microsoft Visual Studio, probabally it is not properly installed. See the explanation here.

    [Go Top]


    Q: Does the MATLAB interface provide a function to do scaling?

    It is extremely easy to do scaling under MATLAB. The following one-line code scale each feature to the range of [0,1]:

    (data - repmat(min(data,[],1),size(data,1),1))*spdiags(1./(max(data,[],1)-min(data,[],1))',0,size(data,2),size(data,2))
    

    [Go Top]


    Q: How could I use MATLAB interface for parameter selection?

    One can do this by a simple loop. See the following example:

    bestcv = 0;
    for log2c = -1:3,
      for log2g = -4:1,
        cmd = ['-v 5 -c ', num2str(2^log2c), ' -g ', num2str(2^log2g)];
        cv = svmtrain(heart_scale_label, heart_scale_inst, cmd);
        if (cv >= bestcv),
          bestcv = cv; bestc = 2^log2c; bestg = 2^log2g;
        end
        fprintf('%g %g %g (best c=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv);
      end
    end
    
    You may adjust the parameter range in the above loops.

    [Go Top]


    Q: I use MATLAB parallel programming toolbox on a multi-core environment for parameter selection. Why the program is even slower?

    Fabrizio Lacalandra of University of Pisa reported this issue. It seems the problem is caused by the screen output. If you disable the info function using

    #if 0,
    then the problem may be solved.

    [Go Top]


    Q: How do I use LIBSVM with OpenMP under MATLAB?

    In Makefile, you need to add -fopenmp to CFLAGS and -lgomp to MEX_OPTION. For Octave, you need the same modification.

    However, a minor problem is that the number of threads cannot be specified in MATLAB. We tried Version 7.12 (R2011a) and gcc-4.6.1.

    % export OMP_NUM_THREADS=4; matlab
    >> setenv('OMP_NUM_THREADS', '1');
    
    Then OMP_NUM_THREADS is still 4 while running the program. Please contact us if you see how to solve this problem. You can, however, specify the number in the source code (thanks to comments from Ricardo Santiago-mozos):
    #pragma omp parallel  for private(i) num_threads(4)
    

    [Go Top]


    Q: How could I generate the primal variable w of linear SVM?

    Let's start from the binary class and assume you have two labels -1 and +1. After obtaining the model from calling svmtrain, do the following to have w and b:

    w = model.SVs' * model.sv_coef;
    b = -model.rho;
    
    if model.Label(1) == -1
      w = -w;
      b = -b;
    end
    
    If you do regression or one-class SVM, then the if statement is not needed.

    For multi-class SVM, we illustrate the setting in the following example of running the iris data, which have 3 classes

      
    > [y, x] = libsvmread('../../htdocs/libsvmtools/datasets/multiclass/iris.scale');
    > m = svmtrain(y, x, '-t 0')
    
    m = 
    
        Parameters: [5x1 double]
          nr_class: 3
           totalSV: 42
               rho: [3x1 double]
             Label: [3x1 double]
             ProbA: []
             ProbB: []
               nSV: [3x1 double]
           sv_coef: [42x2 double]
               SVs: [42x4 double]
    
    sv_coef is like:
    +-+-+--------------------+
    |1|1|                    |
    |v|v|  SVs from class 1  |
    |2|3|                    |
    +-+-+--------------------+
    |1|2|                    |
    |v|v|  SVs from class 2  |
    |2|3|                    |
    +-+-+--------------------+
    |1|2|                    |
    |v|v|  SVs from class 3  |
    |3|3|                    |
    +-+-+--------------------+
    
    so we need to see nSV of each classes.
      
    > m.nSV
    
    ans =
    
         3
        21
        18
    
    Suppose the goal is to find the vector w of classes 1 vs 3. Then y_i alpha_i of training 1 vs 3 are
      
    > coef = [m.sv_coef(1:3,2); m.sv_coef(25:42,1)];
    
    and SVs are:
      
    > SVs = [m.SVs(1:3,:); m.SVs(25:42,:)];
    
    Hence, w is
    > w = SVs'*coef;
    
    For rho,
    > m.rho
    
    ans =
    
        1.1465
        0.3682
       -1.9969
    > b = -m.rho(2);
    
    because rho is arranged by 1vs2 1vs3 2vs3.

    [Go Top]


    Q: Is there an OCTAVE interface for libsvm?

    Yes, after libsvm 2.86, the matlab interface works on OCTAVE as well. Please use make.m by typing

    >> make 
    
    under OCTAVE.

    [Go Top]


    Q: How to handle the name conflict between svmtrain in the libsvm matlab interface and that in MATLAB bioinformatics toolbox?

    The easiest way is to rename the svmtrain binary file (e.g., svmtrain.mexw32 on 32-bit windows) to a different name (e.g., svmtrain2.mexw32).

    [Go Top]


    Q: On Windows I got an error message "Invalid MEX-file: Specific module not found" when running the pre-built MATLAB interface in the windows sub-directory. What should I do?

    The error usually happens when there are missing runtime components such as MSVCR100.dll on your Windows platform. You can use tools such as Dependency Walker to find missing library files.

    For example, if the pre-built MEX files are compiled by Visual C++ 2010, you must have installed Microsoft Visual C++ Redistributable Package 2010 (vcredist_x86.exe). You can easily find the freely available file from Microsoft's web site.

    For 64bit Windows, the situation is similar. If the pre-built files are by Visual C++ 2008, then you must have Microsoft Visual C++ Redistributable Package 2008 (vcredist_x64.exe).

    [Go Top]


    Q: LIBSVM supports 1-vs-1 multi-class classification. If instead I would like to use 1-vs-rest, how to implement it using MATLAB interface?

    Please use code in the following directory. The following example shows how to train and test the problem dna (training and testing).

    Load, train and predict data:

    [trainY trainX] = libsvmread('./dna.scale');
    [testY testX] = libsvmread('./dna.scale.t');
    model = ovrtrain(trainY, trainX, '-c 8 -g 4');
    [pred ac decv] = ovrpredict(testY, testX, model);
    fprintf('Accuracy = %g%%\n', ac * 100);
    
    Conduct CV on a grid of parameters
    bestcv = 0;
    for log2c = -1:2:3,
      for log2g = -4:2:1,
        cmd = ['-q -c ', num2str(2^log2c), ' -g ', num2str(2^log2g)];
        cv = get_cv_ac(trainY, trainX, cmd, 3);
        if (cv >= bestcv),
          bestcv = cv; bestc = 2^log2c; bestg = 2^log2g;
        end
        fprintf('%g %g %g (best c=%g, g=%g, rate=%g)\n', log2c, log2g, cv, bestc, bestg, bestcv);
      end
    end
    

    [Go Top]


    Q: I tried to install matlab interface on mac, but failed. What should I do?

    We assume that in a matlab command window you change directory to libsvm/matlab and type

    >> make
    
    We discuss the following situations.
    1. An error message like "libsvmread.c:1:19: fatal error: stdio.h: No such file or directory" appears.

      Reason: "make" looks for a C++ compiler, but no compiler is found. To get one, you can

      • Install XCode offered by Apple Inc.
      • Install XCode Command Line Tools.

    2. On OS X with Xcode 4.2+, I got an error message like "llvm-gcc-4.2: command not found."

      Reason: Since Apple Inc. only ships llsvm-gcc instead of gcc-4.2, llvm-gcc-4.2 cannot be found.

      If you are using Xcode 4.2-4.6, a related solution is offered at http://www.mathworks.com/matlabcentral/answers/94092.

      On the other hand, for Xcode 5 (including Xcode 4.2-4.6), in a Matlab command window, enter

      • cd (matlabroot)
      • cd bin
      • Backup your mexopts.sh first
      • edit mexopts.sh
      • Scroll down to "maci64" section. Change
        		CC='llvm-gcc-4.2'
        		CXX='llvm-g++-4.2'
        
        to
        		CC='llvm-gcc'
        		CXX='llvm-g++'
        
      Please also ensure that SDKROOT corresponds to the SDK version you are using.

    3. Other errors: you may check http://www.mathworks.com/matlabcentral/answers/94092.

    [Go Top]


    LIBSVM home page

    ================================================ FILE: Matlab/libsvm-3.19/Makefile ================================================ CXX ?= g++ CFLAGS = -Wall -Wconversion -O3 -fPIC SHVER = 2 OS = $(shell uname) all: svm-train svm-predict svm-scale lib: svm.o if [ "$(OS)" = "Darwin" ]; then \ SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \ else \ SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \ fi; \ $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) svm-predict: svm-predict.c svm.o $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm svm-train: svm-train.c svm.o $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm svm-scale: svm-scale.c $(CXX) $(CFLAGS) svm-scale.c -o svm-scale svm.o: svm.cpp svm.h $(CXX) $(CFLAGS) -c svm.cpp clean: rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) ================================================ FILE: Matlab/libsvm-3.19/Makefile.win ================================================ #You must ensure nmake.exe, cl.exe, link.exe are in system path. #VCVARS32.bat #Under dosbox prompt #nmake -f Makefile.win ########################################## CXX = cl.exe CFLAGS = /nologo /O2 /EHsc /I. /D _WIN32 /D _CRT_SECURE_NO_DEPRECATE TARGET = windows all: $(TARGET)\svm-train.exe $(TARGET)\svm-predict.exe $(TARGET)\svm-scale.exe $(TARGET)\svm-toy.exe lib $(TARGET)\svm-predict.exe: svm.h svm-predict.c svm.obj $(CXX) $(CFLAGS) svm-predict.c svm.obj -Fe$(TARGET)\svm-predict.exe $(TARGET)\svm-train.exe: svm.h svm-train.c svm.obj $(CXX) $(CFLAGS) svm-train.c svm.obj -Fe$(TARGET)\svm-train.exe $(TARGET)\svm-scale.exe: svm.h svm-scale.c $(CXX) $(CFLAGS) svm-scale.c -Fe$(TARGET)\svm-scale.exe $(TARGET)\svm-toy.exe: svm.h svm.obj svm-toy\windows\svm-toy.cpp $(CXX) $(CFLAGS) svm-toy\windows\svm-toy.cpp svm.obj user32.lib gdi32.lib comdlg32.lib -Fe$(TARGET)\svm-toy.exe svm.obj: svm.cpp svm.h $(CXX) $(CFLAGS) -c svm.cpp lib: svm.cpp svm.h svm.def $(CXX) $(CFLAGS) -LD svm.cpp -Fe$(TARGET)\libsvm -link -DEF:svm.def clean: -erase /Q *.obj $(TARGET)\. ================================================ FILE: Matlab/libsvm-3.19/README ================================================ Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression. It solves C-SVM classification, nu-SVM classification, one-class-SVM, epsilon-SVM regression, and nu-SVM regression. It also provides an automatic model selection tool for C-SVM classification. This document explains the use of libsvm. Libsvm is available at http://www.csie.ntu.edu.tw/~cjlin/libsvm Please read the COPYRIGHT file before using libsvm. Table of Contents ================= - Quick Start - Installation and Data Format - `svm-train' Usage - `svm-predict' Usage - `svm-scale' Usage - Tips on Practical Use - Examples - Precomputed Kernels - Library Usage - Java Version - Building Windows Binaries - Additional Tools: Sub-sampling, Parameter Selection, Format checking, etc. - MATLAB/OCTAVE Interface - Python Interface - Additional Information Quick Start =========== If you are new to SVM and if the data is not large, please go to `tools' directory and use easy.py after installation. It does everything automatic -- from data scaling to parameter selection. Usage: easy.py training_file [testing_file] More information about parameter selection can be found in `tools/README.' Installation and Data Format ============================ On Unix systems, type `make' to build the `svm-train' and `svm-predict' programs. Run them without arguments to show the usages of them. On other systems, consult `Makefile' to build them (e.g., see 'Building Windows binaries' in this file) or use the pre-built binaries (Windows binaries are in the directory `windows'). The format of training and testing data file is: