Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
5c102bd6
Verified
Commit
5c102bd6
authored
Oct 12, 2019
by
Justin Carpentier
Browse files
algo/check: correct indent
parent
7ea9770d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/algorithm/check.hxx
View file @
5c102bd6
//
// Copyright (c) 2016-201
8
CNRS
// Copyright (c) 2016-201
9
CNRS
INRIA
//
#ifndef __pinocchio_check_hxx__
...
...
@@ -128,27 +128,27 @@ namespace pinocchio
CHECK_DATA
(
(
int
)
data
.
nvSubtree_fromRow
.
size
()
==
model
.
nv
);
for
(
JointIndex
j
=
1
;
int
(
j
)
<
model
.
njoints
;
++
j
)
{
JointIndex
c
=
(
JointIndex
)
data
.
lastChild
[
j
];
CHECK_DATA
((
int
)
c
<
model
.
njoints
);
int
nv
=
model
.
joints
[
j
].
nv
();
for
(
JointIndex
d
=
j
+
1
;
d
<=
c
;
++
d
)
// explore all descendant
{
JointIndex
c
=
(
JointIndex
)
data
.
lastChild
[
j
];
CHECK_DATA
((
int
)
c
<
model
.
njoints
);
int
nv
=
model
.
joints
[
j
].
nv
();
for
(
JointIndex
d
=
j
+
1
;
d
<=
c
;
++
d
)
// explore all descendant
{
CHECK_DATA
(
model
.
parents
[
d
]
>=
j
);
nv
+=
model
.
joints
[
d
].
nv
();
}
CHECK_DATA
(
nv
==
data
.
nvSubtree
[
j
]);
for
(
JointIndex
d
=
c
+
1
;(
int
)
d
<
model
.
njoints
;
++
d
)
CHECK_DATA
(
(
model
.
parents
[
d
]
<
j
)
||
(
model
.
parents
[
d
]
>
c
)
);
int
row
=
model
.
joints
[
j
].
idx_v
();
CHECK_DATA
(
data
.
nvSubtree
[
j
]
==
data
.
nvSubtree_fromRow
[(
size_t
)
row
]);
const
JointModel
&
jparent
=
model
.
joints
[
model
.
parents
[
j
]];
if
(
row
==
0
)
{
CHECK_DATA
(
data
.
parents_fromRow
[(
size_t
)
row
]
==-
1
);
}
else
{
CHECK_DATA
(
jparent
.
idx_v
()
+
jparent
.
nv
()
-
1
==
data
.
parents_fromRow
[(
size_t
)
row
]);
}
CHECK_DATA
(
model
.
parents
[
d
]
>=
j
);
nv
+=
model
.
joints
[
d
].
nv
();
}
CHECK_DATA
(
nv
==
data
.
nvSubtree
[
j
]);
for
(
JointIndex
d
=
c
+
1
;(
int
)
d
<
model
.
njoints
;
++
d
)
CHECK_DATA
(
(
model
.
parents
[
d
]
<
j
)
||
(
model
.
parents
[
d
]
>
c
)
);
int
row
=
model
.
joints
[
j
].
idx_v
();
CHECK_DATA
(
data
.
nvSubtree
[
j
]
==
data
.
nvSubtree_fromRow
[(
size_t
)
row
]);
const
JointModel
&
jparent
=
model
.
joints
[
model
.
parents
[
j
]];
if
(
row
==
0
)
{
CHECK_DATA
(
data
.
parents_fromRow
[(
size_t
)
row
]
==-
1
);
}
else
{
CHECK_DATA
(
jparent
.
idx_v
()
+
jparent
.
nv
()
-
1
==
data
.
parents_fromRow
[(
size_t
)
row
]);
}
}
#undef CHECK_DATA
return
true
;
...
...
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