File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
include/albatross/src/models Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,26 @@ typedef enum ransac_return_code_e {
62
62
RANSAC_RETURN_CODE_FAILURE
63
63
} ransac_return_code_t ;
64
64
65
+ inline std::string to_string (const ransac_return_code_t &return_code) {
66
+ switch (return_code) {
67
+ case RANSAC_RETURN_CODE_INVALID:
68
+ return " invalid" ;
69
+ case RANSAC_RETURN_CODE_SUCCESS:
70
+ return " success" ;
71
+ case RANSAC_RETURN_CODE_NO_CONSENSUS:
72
+ return " no_consensus" ;
73
+ case RANSAC_RETURN_CODE_INVALID_ARGUMENTS:
74
+ return " invalid_arguments" ;
75
+ case RANSAC_RETURN_CODE_EXCEEDED_MAX_FAILED_CANDIDATES:
76
+ return " exceeded_max_failed_candidates" ;
77
+ case RANSAC_RETURN_CODE_FAILURE:
78
+ return " failure" ;
79
+ default :
80
+ assert (false );
81
+ return " unknown return code" ;
82
+ }
83
+ }
84
+
65
85
inline bool ransac_success (const ransac_return_code_t &rc) {
66
86
return rc == RANSAC_RETURN_CODE_SUCCESS;
67
87
}
You can’t perform that action at this time.
0 commit comments