utils.py
Go to the documentation of this file.
1 """
2 GTSAM Copyright 2010-2020, Georgia Tech Research Corporation,
3 Atlanta, Georgia 30332-0415
4 All Rights Reserved
5 
6 See LICENSE for the license information
7 
8 Various common utilities.
9 
10 Author: Varun Agrawal
11 """
12 
13 
15  """
16  Get the chain of namespaces from the lowest to highest for the given object.
17 
18  Args:
19  obj: Object of type Namespace, Class, InstantiatedClass, or Enum.
20  """
21  namespaces = []
22  ancestor = obj.parent
23  while ancestor and ancestor.name:
24  namespaces = [ancestor.name] + namespaces
25  ancestor = ancestor.parent
26  return [''] + namespaces


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:23