Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions knownanswertest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To run this sample, use these commands:

```bash
git clone https://github.com/predrag3141/IPSLQ.git
cd IPSLQ
git checkout toy_example
cd knownanswertest
go test -v pslqcontext.go pslqcontext_test.go
```

In a small percentage of runs, the test fails. This is most likely because the random relation seeded into the random input happens to be all zero, or is zero in all but one coordinate. If the test fails, just re-run it until a useable relation is generated.
2 changes: 1 addition & 1 deletion knownanswertest/pslqcontext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func TestPSLQContext(t *testing.T) {
const (
xLen = 20
xLen = 4
relationElementRange = 5
randomRelationProbabilityThresh = 0.001
maxIterations = 20000
Expand Down
1 change: 1 addition & 0 deletions pslqops/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ func (s *State) OneIteration(
getR func(*bigmatrix.BigMatrix) (*IntOperation, float64, error),
checkInvariantsOptional ...bool,
) (bool, error) {
fmt.Printf("==========\nB:\n%v\nH:\n%v\n", s.b, s.h) // debug
// Initializations
checkInvariants := false
if len(checkInvariantsOptional) > 0 {
Expand Down