diff options
-rw-r--r-- | gd.cc | 3 | ||||
-rw-r--r-- | gd.h | 3 | ||||
-rw-r--r-- | io.cc | 6 | ||||
-rw-r--r-- | io.h | 13 | ||||
-rw-r--r-- | loss_functions.cc | 1 | ||||
-rw-r--r-- | parse_args.cc | 17 | ||||
-rw-r--r-- | parse_args.h | 6 | ||||
-rw-r--r-- | parse_example.cc | 9 | ||||
-rw-r--r-- | parse_example.h | 7 | ||||
-rw-r--r-- | parse_primitives.h | 2 | ||||
-rw-r--r-- | parse_regressor.cc | 11 | ||||
-rw-r--r-- | parse_regressor.h | 6 | ||||
-rw-r--r-- | source.h | 1 | ||||
-rw-r--r-- | v_array.h | 16 | ||||
-rw-r--r-- | vw.cc | 8 |
15 files changed, 10 insertions, 99 deletions
@@ -4,10 +4,7 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -#include <stdlib.h> -#include <math.h> #include <float.h> -#include <string.h> #include "parse_example.h" #include "constant.h" #include "sparse_dense.h" @@ -7,9 +7,8 @@ embodied in the content of this file are licensed under the BSD #ifndef GD_H #define GD_H -#include "math.h" +#include <math.h> #include "parse_example.h" -using namespace std; void print_result(int f, float res, v_array<char> tag); @@ -4,12 +4,6 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ -#include <string.h> #include "io.h" unsigned int buf_read(io_buf &i, char* &pointer, int n) @@ -4,22 +4,11 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - #ifndef IO_H__ #define IO_H__ -#include <iostream> -#include <errno.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <unistd.h> #include "v_array.h" - +#include<iostream> using namespace std; class io_buf { diff --git a/loss_functions.cc b/loss_functions.cc index 6712a859..e7da79a3 100644 --- a/loss_functions.cc +++ b/loss_functions.cc @@ -6,7 +6,6 @@ embodied in the content of this file are licensed under the BSD #include "loss_functions.h" #include<math.h> -#include<iostream> class squaredloss : public loss_function { public: diff --git a/parse_args.cc b/parse_args.cc index 8d0bc9b0..9ac16a13 100644 --- a/parse_args.cc +++ b/parse_args.cc @@ -4,29 +4,14 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - -#include <iostream> -#include <fstream> -#include <math.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <arpa/inet.h> #include <netdb.h> -#include <stdio.h> -#include <unistd.h> #include "fcntl.h" #include "io.h" #include "parse_regressor.h" #include "source.h" #include "parse_args.h" -using namespace std; - +//For OSX #ifndef O_LARGEFILE #define O_LARGEFILE 0 #endif diff --git a/parse_args.h b/parse_args.h index 3a9ba84c..de4b67af 100644 --- a/parse_args.h +++ b/parse_args.h @@ -4,12 +4,6 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - #ifndef PA_H #define PA_H diff --git a/parse_example.cc b/parse_example.cc index cc63e8f4..528ec015 100644 --- a/parse_example.cc +++ b/parse_example.cc @@ -4,17 +4,8 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -#include <vector> -#include <string> -#include <string.h> -#include <float.h> -#include <fcntl.h> -#include <pthread.h> -#include <unistd.h> -#include <sys/file.h> #include "parse_example.h" #include "hash.h" -#include "source.h" #include "cache.h" inline size_t hashstring (substring s, unsigned long h) diff --git a/parse_example.h b/parse_example.h index e0b9938a..9ac0960c 100644 --- a/parse_example.h +++ b/parse_example.h @@ -4,15 +4,8 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* - Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - #ifndef PE_H #define PE_H -//#include "stack.h" #include "io.h" #include "parse_regressor.h" #include "parse_primitives.h" diff --git a/parse_primitives.h b/parse_primitives.h index 25c1df14..d21f522f 100644 --- a/parse_primitives.h +++ b/parse_primitives.h @@ -8,6 +8,8 @@ embodied in the content of this file are licensed under the BSD #define PP #include "v_array.h" +#include<iostream> +using namespace std; struct substring { char *start; diff --git a/parse_regressor.cc b/parse_regressor.cc index 0d401120..c11fb5e5 100644 --- a/parse_regressor.cc +++ b/parse_regressor.cc @@ -4,19 +4,12 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - #include <fstream> #include <iostream> -#include <unistd.h> -#include <stdlib.h> +using namespace std; + #include "parse_regressor.h" #include "loss_functions.h" -using namespace std; void initialize_regressor(regressor &r) { diff --git a/parse_regressor.h b/parse_regressor.h index 6dcddec6..e8014968 100644 --- a/parse_regressor.h +++ b/parse_regressor.h @@ -4,12 +4,6 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - */ - #ifndef PR_H #define PR_H #include "static_data.h" @@ -9,7 +9,6 @@ embodied in the content of this file are licensed under the BSD #include "io.h" #include "static_data.h" -#include <vector> struct example_source { @@ -6,14 +6,8 @@ embodied in the content of this file are licensed under the BSD #include <stdlib.h> -/* -Copyright (c) 2004 John Langford. All rights reserved. The -copyrights embodied in the content of this file are licensed under the -BSD (revised) open source license. -*/ - -#ifndef STACK_H__ -#define STACK_H__ +#ifndef VARRAY_H__ +#define VARRAY_H__ template<class T> class v_array{ public: @@ -31,7 +25,6 @@ template<class T> class v_array{ void erase() { end = begin;} }; - template<class T> inline void push(v_array<T>& v, const T &new_ele) { if(v.end == v.end_array) @@ -62,9 +55,6 @@ template<class T> void push_many(v_array<T>& v, const T* begin, size_t num) v.end += num; } -#include<iostream> -using namespace std; - template<class T> void reserve(v_array<T>& v, size_t length) { v.begin = (T *)realloc(v.begin, sizeof(T) * length); @@ -80,4 +70,4 @@ template<class T> v_array<T> pop(v_array<v_array<T> > &stack) return v_array<T>(); } -#endif // STACK_H__ +#endif // VARRAY_H__ @@ -4,14 +4,6 @@ embodied in the content of this file are licensed under the BSD (revised) open source license */ -/* -Copyright (c) 2007 Yahoo! Inc. All rights reserved. The copyrights -embodied in the content of this file are licensed under the BSD -(revised) open source license - -A smaller change. - */ - #include <math.h> #include <iostream> #include <fstream> |