Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8be3c640
Commit
8be3c640
authored
Jun 25, 2015
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor: Refactor -> Rename internal private methods in the solver
parent
7dcd8115
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
solver.dart
packages/cassowary/lib/solver.dart
+10
-10
No files found.
packages/cassowary/lib/solver.dart
View file @
8be3c640
...
...
@@ -65,7 +65,7 @@ class Solver {
_rows
.
remove
(
tag
.
marker
);
}
else
{
_Pair
<
_Symbol
,
_Row
>
rowPair
=
_
getL
eavingRowPairForMarkerSymbol
(
tag
.
marker
);
_
l
eavingRowPairForMarkerSymbol
(
tag
.
marker
);
if
(
rowPair
==
null
)
{
return
Result
.
internalSolverError
;
...
...
@@ -154,7 +154,7 @@ class Solver {
Solver
operator
<<(
Constraint
c
)
=>
this
..
addConstraint
(
c
);
_Symbol
_
getS
ymbolForVariable
(
Variable
variable
)
{
_Symbol
_
s
ymbolForVariable
(
Variable
variable
)
{
_Symbol
symbol
=
_vars
[
variable
];
if
(
symbol
!=
null
)
{
...
...
@@ -173,7 +173,7 @@ class Solver {
expr
.
terms
.
forEach
((
term
)
{
if
(!
_nearZero
(
term
.
coefficient
))
{
_Symbol
symbol
=
_
getS
ymbolForVariable
(
term
.
variable
);
_Symbol
symbol
=
_
s
ymbolForVariable
(
term
.
variable
);
_Row
foundRow
=
_rows
[
symbol
];
...
...
@@ -303,13 +303,13 @@ class Solver {
Result
_optimizeObjectiveRow
(
_Row
objective
)
{
while
(
true
)
{
_Symbol
entering
=
_
getE
nteringSymbolForObjectiveRow
(
objective
);
_Symbol
entering
=
_
e
nteringSymbolForObjectiveRow
(
objective
);
if
(
entering
.
type
==
SymbolType
.
invalid
)
{
return
Result
.
success
;
}
_Pair
<
_Symbol
,
_Row
>
leavingPair
=
_
getL
eavingRowForEnteringSymbol
(
entering
);
_
l
eavingRowForEnteringSymbol
(
entering
);
if
(
leavingPair
==
null
)
{
return
Result
.
internalSolverError
;
...
...
@@ -324,7 +324,7 @@ class Solver {
}
}
_Symbol
_
getE
nteringSymbolForObjectiveRow
(
_Row
objective
)
{
_Symbol
_
e
nteringSymbolForObjectiveRow
(
_Row
objective
)
{
Map
<
_Symbol
,
double
>
cells
=
objective
.
cells
;
for
(
_Symbol
symbol
in
cells
.
keys
)
{
...
...
@@ -336,7 +336,7 @@ class Solver {
return
new
_Symbol
(
SymbolType
.
invalid
,
0
);
}
_Pair
<
_Symbol
,
_Row
>
_
getL
eavingRowForEnteringSymbol
(
_Symbol
entering
)
{
_Pair
<
_Symbol
,
_Row
>
_
l
eavingRowForEnteringSymbol
(
_Symbol
entering
)
{
double
ratio
=
double
.
MAX_FINITE
;
_Pair
<
_Symbol
,
_Row
>
result
=
new
_Pair
(
null
,
null
);
...
...
@@ -404,7 +404,7 @@ class Solver {
}
}
_Pair
<
_Symbol
,
_Row
>
_
getL
eavingRowPairForMarkerSymbol
(
_Symbol
marker
)
{
_Pair
<
_Symbol
,
_Row
>
_
l
eavingRowPairForMarkerSymbol
(
_Symbol
marker
)
{
double
r1
=
double
.
MAX_FINITE
;
double
r2
=
double
.
MAX_FINITE
;
...
...
@@ -487,7 +487,7 @@ class Solver {
_Row
row
=
_rows
[
leaving
];
if
(
row
!=
null
&&
row
.
constant
<
0.0
)
{
_Symbol
entering
=
_
getD
ualEnteringSymbolForRow
(
row
);
_Symbol
entering
=
_
d
ualEnteringSymbolForRow
(
row
);
if
(
entering
.
type
==
SymbolType
.
invalid
)
{
return
Result
.
internalSolverError
;
...
...
@@ -503,7 +503,7 @@ class Solver {
return
Result
.
success
;
}
_Symbol
_
getD
ualEnteringSymbolForRow
(
_Row
row
)
{
_Symbol
_
d
ualEnteringSymbolForRow
(
_Row
row
)
{
_Symbol
entering
;
double
ratio
=
double
.
MAX_FINITE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment