Skip to content

Commit bcb5679

Browse files
committed
Also return curve length from constant_speed as it is near zero-cost to compute this
1 parent a25ea89 commit bcb5679

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stochman/curves.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def constant_speed(
473473
cs = local_len.cumsum(dim=1) # Bx(N-1)
474474
new_t = torch.cat((torch.zeros(B, 1), cs / cs[:, -1].unsqueeze(1)), dim=1) # BxN
475475
_ = self.fit(new_t, Ct)
476-
return new_t, Ct
476+
return new_t, Ct, local_len.sum(dim=1)
477477

478478
def todiscrete(self, num_nodes=None):
479479
from stochman import DiscreteCurve

0 commit comments

Comments
 (0)