Skip to content

Commit

Permalink
Added talk slides
Browse files Browse the repository at this point in the history
  • Loading branch information
draffensperger committed Oct 28, 2015
1 parent f2034e0 commit a3a6957
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file added BostonGolangTalkSlides.pdf
Binary file not shown.
7 changes: 5 additions & 2 deletions go_to_c/dynamic_c_lib/lp.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ const (
EQ // EQ == 3
)

func (l *LP) AddConstraint(row []float64, ct ConstraintType, rightHand float64) {
func (l *LP) AddConstraint(row []float64,
ct ConstraintType, rightHand float64) {

// Pass a slice as a C array do &slice[0]
C.add_constraint(l.ptr, (*C.double)(&row[0]), C.int(ct), C.double(rightHand))
C.add_constraint(l.ptr, (*C.double)(&row[0]),
C.int(ct), C.double(rightHand))
}

func (l *LP) SetObjFn(row []float64) {
Expand Down

0 comments on commit a3a6957

Please sign in to comment.