Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
3e787fe8
Commit
3e787fe8
authored
Nov 19, 2020
by
Alvarez, Gonzalo
Browse files
Ainur: parse Matrix<String>
parent
45c20d18
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Ainur/AinurState.h
View file @
3e787fe8
...
...
@@ -237,15 +237,15 @@ private:
}
template
<
typename
T
>
void
convertInternal
(
T
&
t
,
String
value
,
typename
EnableIf
<!
Loki
::
TypeTraits
<
T
>::
isIntegral
&&
!
Loki
::
TypeTraits
<
T
>::
isFloat
,
int
>::
Type
=
0
)
const
{
err
(
"convertInternal generic type value = "
+
value
+
"
\n
"
);
}
//
template<typename T>
//
void convertInternal(T& t,
//
String value,
//
typename EnableIf<!Loki::TypeTraits<T>::isIntegral
//
&& !Loki::TypeTraits<T>::isFloat,
//
int>::Type = 0) const
//
{
//
err("convertInternal generic type value = " + value + "\n");
//
}
template
<
typename
T
>
void
convertInternal
(
std
::
vector
<
T
>&
t
,
...
...
@@ -256,10 +256,7 @@ private:
template
<
typename
T
>
void
convertInternal
(
Matrix
<
T
>&
t
,
String
value
,
typename
EnableIf
<
Loki
::
TypeTraits
<
T
>::
isArith
||
IsComplexNumber
<
T
>::
True
,
int
>::
Type
=
0
)
const
;
String
value
)
const
;
template
<
typename
T
>
void
convertInternal
(
T
&
t
,
...
...
src/Ainur/AinurState1.cpp
View file @
3e787fe8
...
...
@@ -257,10 +257,7 @@ AinurState::Action<T>::operator()(A& attr,
template
<
typename
T
>
void
AinurState
::
convertInternal
(
Matrix
<
T
>&
t
,
String
value
,
typename
EnableIf
<
Loki
::
TypeTraits
<
T
>::
isArith
||
IsComplexNumber
<
T
>::
True
,
int
>::
Type
)
const
String
value
)
const
{
namespace
qi
=
boost
::
spirit
::
qi
;
typedef
std
::
string
::
iterator
IteratorType
;
...
...
@@ -324,11 +321,12 @@ void AinurState::convertInternal(std::vector<T>& t,
std
::
cerr
<<
"vector parsing: unmatched part exists
\n
"
;
}
template
void
AinurState
::
convertInternal
(
Matrix
<
DoubleOrFloatType
>
&
,
String
,
int
)
const
;
template
void
AinurState
::
convertInternal
(
Matrix
<
DoubleOrFloatType
>
&
,
String
)
const
;
template
void
AinurState
::
convertInternal
(
Matrix
<
std
::
complex
<
DoubleOrFloatType
>
>&
,
String
,
int
)
const
;
String
)
const
;
template
void
AinurState
::
convertInternal
(
Matrix
<
String
>
&
,
String
)
const
;
template
void
AinurState
::
convertInternal
(
std
::
vector
<
DoubleOrFloatType
>
&
,
String
,
int
)
const
;
...
...
src/InputNg.h
View file @
3e787fe8
...
...
@@ -841,6 +841,14 @@ public:
}
}
void
read
(
Matrix
<
String
>&
m
,
const
String
&
label
)
{
if
(
ainur_
)
return
ainur_
->
readValue
(
m
,
label
);
throw
RuntimeError
(
"InputNg: Matrix<String> not supported in POD inputs
\n
"
);
}
const
String
&
filename
()
const
{
return
file_
;
...
...
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