Skip to content

Commit

Permalink
Rename dlx to Dlx
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHen committed Mar 31, 2016
1 parent a0f0c67 commit c3b980d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/dlx.ts → src/Dlx.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Adapted from http://taeric.github.io/DancingLinks.html
namespace dlx {
namespace Dlx {
export interface DlxLink<T> {
size?: number;
col?: DlxLink<T>;
Expand Down Expand Up @@ -36,7 +36,7 @@ namespace dlx {
};
}

export class Dlx<T> {
export class Solver<T> {
private root: DlxLink<T>;
private solutions: DlxSolution<T>[] = [];
private currentSolution: T[] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/// <reference path="./LatinCell.ts" />
/// <reference path="./LatinHive.ts" />
/// <reference path="./LatinConstraint.ts" />
/// <reference path="./dlx.ts" />
/// <reference path="./Colors.ts" />
/// <reference path="./Dlx.ts" />

namespace LatinSquare {

Expand Down Expand Up @@ -47,7 +47,7 @@ namespace LatinSquare {
let nodes: LatinSquare.Node[] = latinHive.buildNodes(cells);

let constraints: LatinSquare.ConstraintMatrix = latinConstraints.build(size, nodes);
let solver = new dlx.Dlx(constraints, true);
let solver = new Dlx.Solver(constraints, true);
let result = solver.solve();
let solutions: LatinSquare.Solution[] = result.solutions;

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"src/app.ts",
"src/Colors.ts",
"src/d3hive.d.ts",
"src/dlx.ts",
"src/Dlx.ts",
"src/Highlight.ts",
"src/index.ts",
"src/LatinCell.ts",
Expand Down

0 comments on commit c3b980d

Please sign in to comment.