-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
149 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
use crate::lie_group::LieGroup; | ||
use crate::traits::IsLieGroupImpl; | ||
use core::ops::Mul; | ||
use sophus_core::prelude::IsScalar; | ||
|
||
// a * b | ||
impl< | ||
S: IsScalar<BATCH_SIZE>, | ||
const DOF: usize, | ||
const PARAMS: usize, | ||
const POINT: usize, | ||
const AMBIENT: usize, | ||
const BATCH_SIZE: usize, | ||
G: IsLieGroupImpl<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE>, | ||
> Mul<LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>> | ||
for LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G> | ||
{ | ||
type Output = LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>; | ||
|
||
fn mul(self, rhs: Self) -> Self::Output { | ||
self.group_mul(&rhs) | ||
} | ||
} | ||
|
||
// a * &b | ||
impl< | ||
S: IsScalar<BATCH_SIZE>, | ||
const DOF: usize, | ||
const PARAMS: usize, | ||
const POINT: usize, | ||
const AMBIENT: usize, | ||
const BATCH_SIZE: usize, | ||
G: IsLieGroupImpl<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE>, | ||
> Mul<&LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>> | ||
for LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G> | ||
{ | ||
type Output = LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>; | ||
|
||
fn mul(self, rhs: &Self) -> Self::Output { | ||
self.group_mul(rhs) | ||
} | ||
} | ||
|
||
// &a * &b | ||
impl< | ||
S: IsScalar<BATCH_SIZE>, | ||
const DOF: usize, | ||
const PARAMS: usize, | ||
const POINT: usize, | ||
const AMBIENT: usize, | ||
const BATCH_SIZE: usize, | ||
G: IsLieGroupImpl<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE>, | ||
> Mul<LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>> | ||
for &LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G> | ||
{ | ||
type Output = LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>; | ||
|
||
fn mul(self, rhs: LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>) -> Self::Output { | ||
self.group_mul(&rhs) | ||
} | ||
} | ||
|
||
// a * &b | ||
impl< | ||
S: IsScalar<BATCH_SIZE>, | ||
const DOF: usize, | ||
const PARAMS: usize, | ||
const POINT: usize, | ||
const AMBIENT: usize, | ||
const BATCH_SIZE: usize, | ||
G: IsLieGroupImpl<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE>, | ||
> Mul<&LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>> | ||
for &LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G> | ||
{ | ||
type Output = LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>; | ||
|
||
fn mul(self, rhs: &LieGroup<S, DOF, PARAMS, POINT, AMBIENT, BATCH_SIZE, G>) -> Self::Output { | ||
self.group_mul(rhs) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.