Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gd.cc3
-rw-r--r--gd.h3
-rw-r--r--io.cc6
-rw-r--r--io.h13
-rw-r--r--loss_functions.cc1
-rw-r--r--parse_args.cc17
-rw-r--r--parse_args.h6
-rw-r--r--parse_example.cc9
-rw-r--r--parse_example.h7
-rw-r--r--parse_primitives.h2
-rw-r--r--parse_regressor.cc11
-rw-r--r--parse_regressor.h6
-rw-r--r--source.h1
-rw-r--r--v_array.h16
-rw-r--r--vw.cc8
15 files changed, 10 insertions, 99 deletions
diff --git a/gd.cc b/gd.cc
index 621fc8f1..621d0c3c 100644
--- a/gd.cc
+++ b/gd.cc
@@ -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"
diff --git a/gd.h b/gd.h
index 4bdd19f0..e19e6fab 100644
--- a/gd.h
+++ b/gd.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);
diff --git a/io.cc b/io.cc
index 89e6bca0..f9e933b1 100644
--- a/io.cc
+++ b/io.cc
@@ -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)
diff --git a/io.h b/io.h
index 60652bfa..f7a2b7f9 100644
--- a/io.h
+++ b/io.h
@@ -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"
diff --git a/source.h b/source.h
index 8f241bc1..950252e7 100644
--- a/source.h
+++ b/source.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
{
diff --git a/v_array.h b/v_array.h
index 5e6962c2..2f6e92ab 100644
--- a/v_array.h
+++ b/v_array.h
@@ -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__
diff --git a/vw.cc b/vw.cc
index 78456520..418e4dc8 100644
--- a/vw.cc
+++ b/vw.cc
@@ -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>