Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Algorithms Library Toolkit Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Algorithms Library Toolkit
Algorithms Library Toolkit Core
Commits
28a33c49
Commit
28a33c49
authored
7 years ago
by
Jan Trávníček
Browse files
Options
Downloads
Patches
Plain Diff
more concrete nonlinear variable symbol construction
parent
02ce24bc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
alib2algo/src/tree/generate/RandomTreeFactory.cpp
+2
-2
2 additions, 2 deletions
alib2algo/src/tree/generate/RandomTreeFactory.cpp
alib2data/src/alphabet/NonlinearVariableSymbol.h
+0
-21
0 additions, 21 deletions
alib2data/src/alphabet/NonlinearVariableSymbol.h
with
2 additions
and
23 deletions
alib2algo/src/tree/generate/RandomTreeFactory.cpp
+
2
−
2
View file @
28a33c49
...
@@ -169,7 +169,7 @@ struct Node {
...
@@ -169,7 +169,7 @@ struct Node {
if
(
singleNonlinearVariable
)
if
(
singleNonlinearVariable
)
return
ext
::
tree
<
common
::
ranked_symbol
<
>
>
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
"A"
)
)
),
DefaultRankType
(
0
)
),
{
}
);
return
ext
::
tree
<
common
::
ranked_symbol
<
>
>
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
"A"
)
)
),
DefaultRankType
(
0
)
),
{
}
);
else
else
return
ext
::
tree
<
common
::
ranked_symbol
<
>
>
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
symbol
)
),
DefaultRankType
(
0
)
),
{
}
);
return
ext
::
tree
<
common
::
ranked_symbol
<
>
>
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
symbol
)
)
),
DefaultRankType
(
0
)
),
{
}
);
}
else
{
}
else
{
ext
::
vector
<
ext
::
tree
<
common
::
ranked_symbol
<
>
>
>
children
;
ext
::
vector
<
ext
::
tree
<
common
::
ranked_symbol
<
>
>
>
children
;
Node
*
nextChild
=
child
;
Node
*
nextChild
=
child
;
...
@@ -386,7 +386,7 @@ RankedNonlinearPattern < > RandomRankedNonlinearPatternFactory::generateRankedNo
...
@@ -386,7 +386,7 @@ RankedNonlinearPattern < > RandomRankedNonlinearPatternFactory::generateRankedNo
nonlinearVariables
.
insert
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
"A"
)
)
),
DefaultRankType
(
0
)
)
);
nonlinearVariables
.
insert
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
"A"
)
)
),
DefaultRankType
(
0
)
)
);
else
else
for
(
char
i
:
rankedAlphabet
[
0
]
)
for
(
char
i
:
rankedAlphabet
[
0
]
)
nonlinearVariables
.
insert
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
i
)
),
DefaultRankType
(
0
)
)
);
nonlinearVariables
.
insert
(
common
::
ranked_symbol
<
>
(
DefaultSymbolType
(
alphabet
::
NonlinearVariableSymbol
<
>
(
DefaultSymbolType
(
i
)
)
),
DefaultRankType
(
0
)
)
);
common
::
ranked_symbol
<
>
subtreeWildcard
=
alphabet
::
SubtreeWildcardSymbol
::
instance
<
common
::
ranked_symbol
<
>
>
(
);
common
::
ranked_symbol
<
>
subtreeWildcard
=
alphabet
::
SubtreeWildcardSymbol
::
instance
<
common
::
ranked_symbol
<
>
>
(
);
treeRankedAlphabet
.
insert
(
subtreeWildcard
);
treeRankedAlphabet
.
insert
(
subtreeWildcard
);
...
...
This diff is collapsed.
Click to expand it.
alib2data/src/alphabet/NonlinearVariableSymbol.h
+
0
−
21
View file @
28a33c49
...
@@ -26,17 +26,8 @@ class NonlinearVariableSymbol : public SymbolBase {
...
@@ -26,17 +26,8 @@ class NonlinearVariableSymbol : public SymbolBase {
SymbolType m_symbol;
SymbolType m_symbol;
public:
public:
explicit NonlinearVariableSymbol ( int number );
explicit NonlinearVariableSymbol ( char character );
explicit NonlinearVariableSymbol ( std::string symbol );
explicit NonlinearVariableSymbol ( SymbolType symbol );
explicit NonlinearVariableSymbol ( SymbolType symbol );
/**
* Creates a subtreeWildcard symbol.
* @param symbol name of the symbol
*/
explicit NonlinearVariableSymbol ( );
virtual SymbolBase * clone ( ) const;
virtual SymbolBase * clone ( ) const;
virtual SymbolBase * plunder ( ) &&;
virtual SymbolBase * plunder ( ) &&;
...
@@ -67,18 +58,6 @@ public:
...
@@ -67,18 +58,6 @@ public:
typedef NonlinearVariableSymbol < > normalized_type;
typedef NonlinearVariableSymbol < > normalized_type;
};
};
template < class SymbolType >
NonlinearVariableSymbol < SymbolType >::NonlinearVariableSymbol ( int number ) : m_symbol ( DefaultSymbolType ( number ) ) {
}
template < class SymbolType >
NonlinearVariableSymbol < SymbolType >::NonlinearVariableSymbol ( char character ) : m_symbol ( DefaultSymbolType ( character ) ) {
}
template < class SymbolType >
NonlinearVariableSymbol < SymbolType >::NonlinearVariableSymbol ( std::string symbol ) : m_symbol ( DefaultSymbolType ( std::move ( symbol ) ) ) {
}
template < class SymbolType >
template < class SymbolType >
NonlinearVariableSymbol < SymbolType >::NonlinearVariableSymbol ( SymbolType symbol ) : m_symbol ( std::move ( symbol ) ) {
NonlinearVariableSymbol < SymbolType >::NonlinearVariableSymbol ( SymbolType symbol ) : m_symbol ( std::move ( symbol ) ) {
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment