Function of "trim_depvect" can't be found in help

Zheng Guotao
Zheng Guotao Altair Community Member
edited December 2023 in Community Q&A

Function of "trim_depvect" can't be found in help document

How to find the full explanation of all Hypergraph function and the explanation how to use it in Hypergraph. 

Now most of function can be found in help document, but part of them aren't in the help document such as "trim_depvect"

image

image

Best Answer

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    edited December 2023 Answer ✓

    Hello @Zheng Guotao ,

     

    this function is not documented as it is generally not used intependantly.

    Below here's the Templex code of that function:

        *BeginTemplexFunction()

            *BeginText()

                function trim_depvect(dep_vect,ind_vect)

                {

                    if(numpts(dep_vect) > numpts(ind_vect))

                    result = dep_vect[0:(numpts(ind_vect)-1):1]

                    return result

                else

                    return dep_vect

                    endif

                }

            *EndText()

        *EndTemplexFunction()

     

    which means this functin truncates first vector if its length is different from second vector.

     

    Hope this helps,

    Michael

Answers

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    edited December 2023 Answer ✓

    Hello @Zheng Guotao ,

     

    this function is not documented as it is generally not used intependantly.

    Below here's the Templex code of that function:

        *BeginTemplexFunction()

            *BeginText()

                function trim_depvect(dep_vect,ind_vect)

                {

                    if(numpts(dep_vect) > numpts(ind_vect))

                    result = dep_vect[0:(numpts(ind_vect)-1):1]

                    return result

                else

                    return dep_vect

                    endif

                }

            *EndText()

        *EndTemplexFunction()

     

    which means this functin truncates first vector if its length is different from second vector.

     

    Hope this helps,

    Michael

  • Zheng Guotao
    Zheng Guotao Altair Community Member
    edited November 2023

    Hello @Zheng Guotao ,

     

    this function is not documented as it is generally not used intependantly.

    Below here's the Templex code of that function:

        *BeginTemplexFunction()

            *BeginText()

                function trim_depvect(dep_vect,ind_vect)

                {

                    if(numpts(dep_vect) > numpts(ind_vect))

                    result = dep_vect[0:(numpts(ind_vect)-1):1]

                    return result

                else

                    return dep_vect

                    endif

                }

            *EndText()

        *EndTemplexFunction()

     

    which means this functin truncates first vector if its length is different from second vector.

     

    Hope this helps,

    Michael

    Michael, thanks for your feedback