open-sourced LU decomposition and update - linear-programming

I am working on my own LP solver but with the module of LU decomposition and update missing. Just wondering if there are any open-sourced and widely used packages from github that I can use to merge into my developed LP framework.

A solid and well-known implementation is LUSOL from Mike Saunders (Stanford). https://stanford.edu/group/SOL/software/lusol/

Related

Existing API for NLP in C++?

Is/are there existing C++ NLP API(s) out there? The closest thing I have found is CLucene, a port of Lucene. However, it seems a bit obsolete and the documentation is far from complete.
Ideally, this/these API(s) would permit tokenization, stemming and PoS tagging.
Freeling is written in C++ too, although most people just use their binaries to run the tools: http://devel.cpl.upc.edu/freeling/downloads?order=time&desc=1
Try something like DyNet, it's a generic neural net framework but most of its processes are focusing on NLP because the maintainers are creators of the NLP community.
Or perhaps Marian-NMT, it was designed for sequence-to-sequence model machine translation but potentially many NLP tasks can be structured as a sequence-to-sequence task.
Outdated
Maybe you can try Ellogon http://www.ellogon.org/ , they have GUI support and also C/C++ API for NLP too.
if you remove the restriction on c++ , you get the perfect NLTK (python)
the remaining effort is then interfacing between python and c++.
Apache Lucy would get you part of the way there. It is under active development.
Maybe you can use Weka-C++. It's the very popular Weka library for machine learning and data mining (including NLP) ported from Java to C++.
Weka supports tokenization and stemming, you'll probably need to train a classifier for PoS tagging.
I only used Weka with Java though, so I'm afraid can't give you more details on this version.
There is TurboParser by André Martins at CMU, also has a Python wrapper. There is is an online demo for it.
This project provides free (even for commercial use) state-of-the-art information extraction tools. The current release includes tools for performing named entity extraction and binary relation detection as well as tools for training custom extractors and relation detectors.
MITIE is built on top of dlib, a high-performance machine-learning library, MITIE makes use of several state-of-the-art techniques including the use of distributional word embeddings and Structural Support Vector Machines[3]. MITIE offers several pre-trained models providing varying levels of support for both English and Spanish, trained using a variety of linguistic resources (e.g., CoNLL 2003, ACE, Wikipedia, Freebase, and Gigaword). The core MITIE software is written in C++, but bindings for several other software languages including Python, R, Java, C, and MATLAB allow a user to quickly integrate MITIE into his/her own applications.
https://github.com/mit-nlp/MITIE

Efficient implementation of the Nearest Neighbour Search

I am trying to implement an efficient algorithm for nearest-neighbour search problem.
I have read tutorials about some data structures, which support operations for this kind of problems (for example, R-tree, cover tree, etc.), but all of them are difficult to implement.
Also I cannot find sample source code for these data structures. I know C++ and I am trying to solve this problem in this language.
Ideally, I need links that describe how to implement these data structures using source code.
There are several good choices of fast nearest neighbor search libraries.
ANN, which is based on the work of Mount and Arya. This work is documented in a paper by S. Arya and D. M. Mount. "Approximate nearest neighbor queries in fixed dimensions". In Proc. 4th ACM-SIAM Sympos. Discrete Algorithms, pages 271–280, 1993.
FLANN, which is based on the work of Marius Muja & Co. There is a paper by Marius Muja and David G. Lowe, "Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration", in International Conference on Computer Vision Theory and Applications (VISAPP'09), 2009. The code for FLANN is available on github
FLANN seems to be quicker in some cases, and is a more modern version of the code with solid bindings for a number of other languages, that can incorporate changes rapidly. ANN is probably a good choice if you want a solid well-tested standard library.
Edit in Response to Comment
Both of these libraries have extensive documentation and examples.
Sample code for ANN is available in the Manual, In section 2.1.4
Sample code for FLANN is available in the FLANN repository examples directory, for example /examples/flann_examples.c
You could try a linesweep algorithm to find the closest pair of points: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=lineSweep.

How to do Face Recognition using OpenCV? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to do some Face Recognition (not detection) stuff using OpenCV. I found this article with some code:
http://www.cognotics.com/opencv/servo_2007_series/index.html
However, this code is written using the older C-style OpenCV API. Does someone have a C++ API version of this using a more recent version like OpenCV 2.3.1?
Update: OpenCV 2.4.2 now comes with the very new cv::FaceRecognizer. Please see the very detailed documentation at:
http://docs.opencv.org/trunk/modules/contrib/doc/facerec/index.html
I have released libfacerec, a modern face recognition library for the OpenCV C++ API (BSD license). libfacerec has no additional dependencies and implements the Eigenfaces method, Fisherfaces method and Local Binary Patterns Histograms. Parts of the library are going to be included in OpenCV 2.4.
The latest revision of the libfacerec is available at:
https://github.com/bytefish/libfacerec
The library was written for OpenCV 2.3.1 with the upcoming OpenCV 2.4 in mind, so I don't support OpenCV versions earlier than 2.3.1. This project comes as a CMake project with a well-documented API, there's also a tutorial on gender classification. You can see a HTML version of the documentation at:
http://www.bytefish.de/dev/libfacerec/
If you want to understand how those algorithms work, you might want to read my Guide To Face Recognition (includes Python and GNU Octave/MATLAB examples):
http://www.bytefish.de/blog/face_recognition_with_opencv2
The relevant publications are:
Turk, M., and Pentland, A. Eigenfaces for recognition.. Journal of Cognitive Neuroscience 3 (1991), 71–86.
Belhumeur, P. N., Hespanha, J., and Kriegman, D. Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection.. IEEE Transactions on Pattern Analysis and Machine Intelligence 19, 7 (1997), 711–720.
Ahonen, T., Hadid, A., and Pietikainen, M. Face Recognition with Local Binary Patterns.. Computer Vision - ECCV 2004 (2004), 469–481.
I'm doing a face recognition project for my engineer's degree, using c++ api. I think that everything regarding face recognition in c++ is fairly straightforward, even simpler than in C (less pointers). To use PCA you have a class named PCA described here. Just use the proper methods and read documentation with understanding. To build the matrix with input data I've created a matrix of proper size, then pasted pictures as rows (use method reshape) into it (there is a method in cv::Mat that lets you to get easily a row of a matrix). You just need to keep sure that base data and tested data have the same parameters (channels, size,etc.)
EDIT:
using namespace cv; //somewhere near top
inserting data to data matrix:
62 Mat reshaped=img.reshape(1,1);
63 Mat dataRow=_data.row(y++);
64 resize(reshaped,dataRow,dataRow.size(),0,0,CV_INTER_LINEAR);
computing pca:
251 _pca(_data,Mat(),CV_PCA_DATA_AS_ROW); //compute pca
252 _pca.project(_data,_vectors); // project original data to new coordinates
As opencv's documentation isn't the best out there, it doesn't hurt to spend some time reading it. Most of the c api functions have their equivalents in c++ api, You only need to do some "write into search window and hit enter" searching. And, there are also tutorials in c++ to get a grip of the c++ api.

Information on L-Systems

I am about to start a project for university to build a procedural city for a pre existing project.
I was wondering if any of you have had any experience coding L-Systems before and know a good place for me to start out. I have done a bit of work before using procedural methods and Perlin Noise and fBm so I get the premise of what an L-System is in the fractal sense. I am more looking for a place where maybe can push me in the direction of coding the L-System.
Any help or technical documents you can point me towards would be great.
I did a project on using L-Systems to procedurally generate 3D trees and found the book "The Algorithmic Beauty of Plants" helpful. It's available for free at that link. Not directly related to procedural cities, but very interesting, and a good resource to learn about L-Systems, I think.
I'm working on an L-system project too, and it's been tremendously helpful to look at some pre-existing code: lsystem.py - There's also pseudocode in Fundamentals of Natural Computing which I found really helpful. It takes you through the process of using turtle graphics to create a simple L-system tree, and quickly moves on to more advanced stuff.
Well ... I'll go first and hand you the Wikipedia link, which looks reasonably meaty, and has quite a few external links of its own.

How to build sliding block puzzle software for mobiles

I want to build software of the good old sliding block puzzle for mobile phones could you please guide me how to generate the sliding block puzzle and solving techniques
Have a look at Simon Tatham's Portable Puzzle Collection, with full source. You may be able to use its framework directly, and even if you can't you'll find excellent examples of solvers.