GithubHelp home page GithubHelp logo

pyqpbo's Introduction

Build Status pypi version licence DOI

PyStruct

PyStruct aims at being an easy-to-use structured learning and prediction library. Currently it implements only max-margin methods and a perceptron, but other algorithms might follow.

The goal of PyStruct is to provide a well-documented tool for researchers as well as non-experts to make use of structured prediction algorithms. The design tries to stay as close as possible to the interface and conventions of scikit-learn.

You can install pystruct using

pip install pystruct

Some of the functionality (namely OneSlackSSVM and NSlackSSVM) requires that cvxopt is installed. See the installation instructions for more details.

The full documentation and installation instructions can be found at the website: http://pystruct.github.io

You can contact the authors either via the mailing list or on github.

Currently the project is mostly maintained by Andreas Mueller, but contributions are very welcome.

Jean-Luc Meunier (Naver Labs Europe) contributed a new model and did some maintenance, in the course of the EU READ project. See READ_Contribution.md

pyqpbo's People

Contributors

amueller avatar fgregg avatar lowks avatar thomasp6t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyqpbo's Issues

build failed with clang

Hi,

I got a build failure on macos. the message is

QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)

IMHO it's related to opengm/opengm#42?

About how to build and install pyqpbo on Macos

I encountered quite a lot problem with opengm, so I come back here..

1.run python setup.py build_ext --inplace
1.You will got some errors, change the setup.py file: delete the QPBOinstall.
3.Go to the QPBO-v1.3.src and find the instance.ini, change it to:

#include "QPBO.h"

#ifdef _MSC_VER
#pragma warning(disable: 4661)
#endif



template <> 
	inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)
{
	type_name = "int";
	type_format = "d";
}

template <> 
	inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)
{
	type_name = "float";
	type_format = "f";
}

template <> 
	inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)
{
	type_name = "double";
	type_format = "Lf";
}
// Instantiations
template class QPBO<int>;
template class QPBO<float>;
template class QPBO<double>;

which moves the instantiation to the bottom.
4.run python setup.py build_ext --inplace again.
And now you can use it normally I think. Copy the pyqpbo dir to your own project and then you'll be able to:
from pyqpbo import binary_grid, alpha_expansion_grid, binary_graph

Does not install in Max OS X Mavericks

Get 3 errors during pip install pyqpbo:

Downloading/unpacking pyqpbo
Running setup.py egg_info for package pyqpbo

Installing collected packages: pyqpbo
Running setup.py install for pyqpbo
building 'pyqpbo.pyqpbo' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c src/pyqpbo.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/pyqpbo.o -fpermissive
In file included from src/pyqpbo.cpp:257:
In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:
/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from src/pyqpbo.cpp:259:
In file included from QPBO-v1.3.src/QPBO.h:113:
QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!next) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!first) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
3 warnings generated.
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src/QPBO.o -fpermissive
In file included from QPBO-v1.3.src/QPBO.cpp:7:
In file included from QPBO-v1.3.src/QPBO.h:113:
QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!next) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!first) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
fprintf(fp, "1 %d %d\n", i+1, delta);
~~ ^~~~~
%f
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::Save' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
~~ ^~~~~~~~~~~~~~~~~~~~~
%f
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
fprintf(fp, "1 %d %d\n", i+1, delta);
~~ ^~~~~
%f
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::Save' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
~~ ^~~~~~~~~~~~~~~~~~~~~
%f
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char ' is deprecated [-Wdeprecated-writable-strings]
if (!nodes[0]) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here
template class QPBO;
^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char ' is deprecated [-Wdeprecated-writable-strings]
if (!arcs[0]) { if (error_function) (error_function)("Not enough memory!"); exit(1); }
^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here
template class QPBO;
^
QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation
inline void QPBO::get_type_information(char
& type_name, char
& type_format)
^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
get_type_information(type_name, type_format);
^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char ' is deprecated [-Wdeprecated-writable-strings]
type_name = "int";
^
QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
type_format = "d";
^
QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation
inline void QPBO::get_type_information(char
& type_name, char
& type_format)
^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
get_type_information(type_name, type_format);
^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
type_name = "float";
^
QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
type_format = "f";
^
QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation
inline void QPBO::get_type_information(char& type_name, char*& type_format)
^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
get_type_information(type_name, type_format);
^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
type_name = "double";
^
QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
type_format = "Lf";
^
28 warnings and 3 errors generated.
error: command 'gcc' failed with exit status 1
Complete output from command /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/bin/python -c "import setuptools;file='/Users/simon.hughes/GitHub/NlpResearch/build/pyqpbo/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/97/_9xfnqln35vb6b1ng9czmr2d4x97nt/T/pip-VpwVwb-record/install-record.txt:
running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-x86_64-2.7

creating build/lib.macosx-10.6-x86_64-2.7/pyqpbo

copying pyqpbo/init.py -> build/lib.macosx-10.6-x86_64-2.7/pyqpbo

running build_ext

building 'pyqpbo.pyqpbo' extension

creating build/temp.macosx-10.6-x86_64-2.7

creating build/temp.macosx-10.6-x86_64-2.7/src

creating build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src

gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c src/pyqpbo.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/pyqpbo.o -fpermissive

In file included from src/pyqpbo.cpp:257:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:

/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^

In file included from src/pyqpbo.cpp:259:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                            if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                               ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                    if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                        ^

3 warnings generated.

gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src/QPBO.o -fpermissive

In file included from QPBO-v1.3.src/QPBO.cpp:7:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                            if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                               ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                    if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                        ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                    fprintf(fp, "1 %d %d\n", i+1, delta);

                                      ~~          ^~~~~

                                      %f

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::Save' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                    fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                         ~~               ^~~~~~~~~~~~~~~~~~~~~

                                         %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                    fprintf(fp, "1 %d %d\n", i+1, delta);

                                      ~~          ^~~~~

                                      %f

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::Save' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                    fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                         ~~               ^~~~~~~~~~~~~~~~~~~~~

                                         %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)

                           ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "int";

                ^

QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "d";

                  ^

QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)

                             ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "float";

                ^

QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "f";

                  ^

QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)

                              ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "double";

                ^

QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "Lf";

                  ^

28 warnings and 3 errors generated.

error: command 'gcc' failed with exit status 1


Command /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/bin/python -c "import setuptools;file='/Users/simon.hughes/GitHub/NlpResearch/build/pyqpbo/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/97/_9xfnqln35vb6b1ng9czmr2d4x97nt/T/pip-VpwVwb-record/install-record.txt failed with error code 1
Storing complete log in /Users/simon.hughes/.pip/pip.log

[question]Why int?

Why do you use integers? Why not doubles?

In pystruct there is a code like (1000*unary).toint, I think this may decrease quality of inference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.