Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
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
lvzhengyang
abc
Commits
d948ef80
Commit
d948ef80
authored
Apr 23, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command 'cubeenum'.
parent
47142c08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
src/base/abci/abc.c
+53
-0
No files found.
src/base/abci/abc.c
View file @
d948ef80
...
...
@@ -272,6 +272,7 @@ static int Abc_CommandExtWin ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandInsWin
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandPermute
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandUnpermute
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandCubeEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandCec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandDCec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -841,6 +842,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"inswin"
,
Abc_CommandInsWin
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"permute"
,
Abc_CommandPermute
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"unpermute"
,
Abc_CommandUnpermute
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Sequential"
,
"cubeenum"
,
Abc_CommandCubeEnum
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Verification"
,
"cec"
,
Abc_CommandCec
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Verification"
,
"dcec"
,
Abc_CommandDCec
,
0
);
...
...
@@ -19395,6 +19397,57 @@ usage:
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandCubeEnum
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Abc_EnumerateCubeStates
();
extern
void
Abc_EnumerateCubeStatesZdd
();
int
c
,
fZddAlgo
=
0
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"zvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'z'
:
fZddAlgo
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
Abc_Print
(
-
2
,
"Unknown switch.
\n
"
);
goto
usage
;
}
}
if
(
fZddAlgo
)
Abc_EnumerateCubeStatesZdd
();
else
Abc_EnumerateCubeStates
();
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: cubeenum [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
enumerates reachable states of 2x2x2x cube
\n
"
);
Abc_Print
(
-
2
,
"
\t
(http://en.wikipedia.org/wiki/Pocket_Cube)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-z : toggle using ZDD-based algorithm [default = %s]
\n
"
,
fZddAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
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