Skip to content

Instantly share code, notes, and snippets.

View clhodapp's full-sized avatar

Chris Hodapp clhodapp

  • San Francisco, California
View GitHub Profile
@clhodapp
clhodapp / hw.cls
Last active December 11, 2015 20:28 — forked from jhwilson/jhwhw.cls
%=====================================================================
% hw.cls
% Provide hw.cls class
%=====================================================================
%=====================================================================
% Identification
%=====================================================================
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hw}[2013/1/28 Based on Justin Wilson's Homework Class]
@clhodapp
clhodapp / KeyValueParser.scala
Created June 5, 2012 14:59 — forked from chbaranowski/KeyValueParser.scala
Scala RegEx Parser Demo
import scala.util.parsing.combinator.RegexParsers
/**
* Simple parser for a key value string like:
* key01 = Value01 key02=value02 key03 =value03 key04= value04
*
* The parser does not support whitespace in key or values.
*/
object KeyValueParser extends RegexParsers {
public Tableau makeArtificial() {
Matrix tmp = getA().mergeRight(Matrix.identity(constraints)).mergeRight(getRHS()); //insert identity
tmp = tmp.mergeDown(new Matrix(1,vars).extend(0,constraints,1d).extend(0,1)); //add new cost row
return new Tableau(tmp);
}
vs
public Tableau makeArtificial() {
Double[][] tmp = new Double[height][width+height-1];