36             control_attrib = 
"P"_UTsh;
 
   60         for (
int i = 0; i < list.
entries(); i++)
 
   81         myClusterAttrib = 
"cluster"_UTsh;
 
   82         myOutputCenter = 
false;
 
   83         myControls.setSize(1);
 
   86         myThresholdAttrib = 
""_UTsh;
 
   87         myThresholdWeight = 10;
 
   88         myInitialThreshold = 1;
 
   89         myFinalThreshold = 0.25;
 
  104         if (myNumClusters != src.myNumClusters) 
return false;
 
  105         if (myClusterAttrib != src.myClusterAttrib) 
return false;
 
  106         if (myOutputCenter != src.myOutputCenter) 
return false;
 
  107         if (myControls != src.myControls) 
return false;
 
  108         if (myIterations != src.myIterations) 
return false;
 
  109         if (myRandomSeed != src.myRandomSeed) 
return false;
 
  110         if (myThresholdAttrib != src.myThresholdAttrib) 
return false;
 
  111         if (myThresholdWeight != src.myThresholdWeight) 
return false;
 
  112         if (myInitialThreshold != src.myInitialThreshold) 
return false;
 
  113         if (myFinalThreshold != src.myFinalThreshold) 
return false;
 
  114         if (myUseLInf != src.myUseLInf) 
return false;
 
  115         if (myKMeanPP != src.myKMeanPP) 
return false;
 
  132         if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
 
  133             graph->
evalOpParm(myNumClusters, nodeidx, 
"num_clusters", time, graph->
isDirect()?
nullptr:depnode);
 
  134         myClusterAttrib = 
"cluster"_UTsh;
 
  136             graph->
evalOpParm(myClusterAttrib, nodeidx, 
"cluster_attrib", time, graph->
isDirect()?
nullptr:depnode);
 
  137         myOutputCenter = 
false;
 
  138         if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
 
  139             graph->
evalOpParm(myOutputCenter, nodeidx, 
"output_center", time, graph->
isDirect()?
nullptr:depnode);
 
  143             graph->
evalOpParm(length, nodeidx, 
"num_controls", time, graph->
isDirect()?
nullptr:depnode);
 
  144             if (length < 0) length = 0;
 
  145             myControls.setSize(length);
 
  152                 auto && _curentry = myControls(i);
 
  154                 _curentry.control_attrib = 
"P"_UTsh;
 
  156                     graph->
evalOpParmInst(_curentry.control_attrib, nodeidx, 
"control_attrib#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
 
  157                 _curentry.control_weight = 1;
 
  159                     graph->
evalOpParmInst(_curentry.control_weight, nodeidx, 
"control_weight#", parmidx, offsets, time, graph->
isDirect()?
nullptr:depnode, 2-1);
 
  166         if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
 
  167             graph->
evalOpParm(myIterations, nodeidx, 
"iterations", time, graph->
isDirect()?
nullptr:depnode);
 
  169         if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
 
  170             graph->
evalOpParm(myRandomSeed, nodeidx, 
"random_seed", time, graph->
isDirect()?
nullptr:depnode);
 
  171         myThresholdAttrib = 
""_UTsh;
 
  173             graph->
evalOpParm(myThresholdAttrib, nodeidx, 
"threshold_attrib", time, graph->
isDirect()?
nullptr:depnode);
 
  174         myThresholdWeight = 10;
 
  175         if (
true && ( (
true&&!(((getThresholdAttrib()==
"")))) ) )
 
  176             graph->
evalOpParm(myThresholdWeight, nodeidx, 
"threshold_weight", time, graph->
isDirect()?
nullptr:depnode);
 
  177         myInitialThreshold = 1;
 
  178         if (
true && ( (
true&&!(((getThresholdAttrib()==
"")))) ) )
 
  179             graph->
evalOpParm(myInitialThreshold, nodeidx, 
"initial_threshold", time, graph->
isDirect()?
nullptr:depnode);
 
  180         myFinalThreshold = 0.25;
 
  181         if (
true && ( (
true&&!(((getThresholdAttrib()==
"")))) ) )
 
  182             graph->
evalOpParm(myFinalThreshold, nodeidx, 
"final_threshold", time, graph->
isDirect()?
nullptr:depnode);
 
  185             graph->
evalOpParm(myUseLInf, nodeidx, 
"use_linf", time, graph->
isDirect()?
nullptr:depnode);
 
  187         if (
true && ( (
true&&!((((graph->
getInput(nodeidx,1)>=0)==1)))) ) )
 
  188             graph->
evalOpParm(myKMeanPP, nodeidx, 
"kmeanpp", time, graph->
isDirect()?
nullptr:depnode);
 
  204     template <
typename T>
 
  211         if (idx.
size() != instance.
size()+1)
 
  227                 else if (instance[0] < myControls.entries())
 
  229                     auto && _data = myControls(instance[0]);
 
  280     { doGetParmValue(idx, instance, value); }
 
  282     { doGetParmValue(idx, instance, value); }
 
  284     { doGetParmValue(idx, instance, value); }
 
  286     { doGetParmValue(idx, instance, value); }
 
  288     { doGetParmValue(idx, instance, value); }
 
  290     { doGetParmValue(idx, instance, value); }
 
  292     { doGetParmValue(idx, instance, value); }
 
  294     { doGetParmValue(idx, instance, value); }
 
  296     { doGetParmValue(idx, instance, value); }
 
  298     { doGetParmValue(idx, instance, value); }
 
  300     { doGetParmValue(idx, instance, value); }
 
  302     template <
typename T>
 
  309         if (idx.
size() != instance.
size()+1)
 
  327                     if (newsize < 0) newsize = 0;
 
  328                     myControls.setSize(newsize);
 
  334                     myControls.setSizeIfNeeded(instance[0]+1);
 
  335                     auto && _data = myControls(instance[0]);
 
  377     { doSetParmValue(idx, instance, value); }
 
  379     { doSetParmValue(idx, instance, value); }
 
  381     { doSetParmValue(idx, instance, value); }
 
  383     { doSetParmValue(idx, instance, value); }
 
  385     { doSetParmValue(idx, instance, value); }
 
  387     { doSetParmValue(idx, instance, value); }
 
  389     { doSetParmValue(idx, instance, value); }
 
  391     { doSetParmValue(idx, instance, value); }
 
  393     { doSetParmValue(idx, instance, value); }
 
  395     { doSetParmValue(idx, instance, value); }
 
  397     { doSetParmValue(idx, instance, value); }
 
  415         if (fieldnum.
size() < 1)
 
  420                 return "num_clusters";
 
  422                 return "cluster_attrib";
 
  424                 return "output_center";
 
  426                 if (fieldnum.
size() == 1)
 
  427                     return "num_controls";
 
  431                         return "control_attrib#";
 
  433                         return "control_weight#";
 
  440                 return "random_seed";
 
  442                 return "threshold_attrib";
 
  444                 return "threshold_weight";
 
  446                 return "initial_threshold";
 
  448                 return "final_threshold";
 
  460         if (fieldnum.
size() < 1)
 
  461             return PARM_UNSUPPORTED;
 
  471                 if (fieldnum.
size() == 1)
 
  472                     return PARM_MULTIPARM;
 
  536         loadData(is, rampdata);
 
  554                 int             typelen = colon - data.
buffer();
 
  568     { 
int64 iv = 
v; UTwrite(os, &iv); }
 
  570     { UTwrite<fpreal64>(os, &
v); }
 
  572     { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y()); }
 
  574     { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
 
  575       UTwrite<fpreal64>(os, &v.
z()); }
 
  577     { UTwrite<fpreal64>(os, &v.
x()); UTwrite<fpreal64>(os, &v.
y());
 
  578       UTwrite<fpreal64>(os, &v.
z()); UTwrite<fpreal64>(os, &v.
w()); }
 
  590         if (s) s->save(ostr);
 
  592         saveData(os, result);
 
  599             ostr << s->getDataTypeToken();
 
  604         saveData(os, result);
 
  608     void         save(std::ostream &os)
 const 
  612         saveData(os, myNumClusters);
 
  613         saveData(os, myClusterAttrib);
 
  614         saveData(os, myOutputCenter);
 
  617             UTwrite(os, &length);
 
  620                 auto && _curentry = myControls(i);
 
  622                 saveData(os, _curentry.control_attrib);
 
  623                 saveData(os, _curentry.control_weight);
 
  627         saveData(os, myIterations);
 
  628         saveData(os, myRandomSeed);
 
  629         saveData(os, myThresholdAttrib);
 
  630         saveData(os, myThresholdWeight);
 
  631         saveData(os, myInitialThreshold);
 
  632         saveData(os, myFinalThreshold);
 
  633         saveData(os, myUseLInf);
 
  634         saveData(os, myKMeanPP);
 
  647         loadData(is, myNumClusters);
 
  648         loadData(is, myClusterAttrib);
 
  649         loadData(is, myOutputCenter);
 
  653             myControls.setSize(length);
 
  656                 auto && _curentry = myControls(i);
 
  658                 loadData(is, _curentry.control_attrib);
 
  659                 loadData(is, _curentry.control_weight);
 
  663         loadData(is, myIterations);
 
  664         loadData(is, myRandomSeed);
 
  665         loadData(is, myThresholdAttrib);
 
  666         loadData(is, myThresholdWeight);
 
  667         loadData(is, myInitialThreshold);
 
  668         loadData(is, myFinalThreshold);
 
  669         loadData(is, myUseLInf);
 
  670         loadData(is, myKMeanPP);
 
  680         if (!thissop) 
return getNumClusters();
 
  682         OP_Utils::evalOpParm(result, thissop, 
"num_clusters", cookparms.
getCookTime(), 0);
 
  690         if (!thissop) 
return getClusterAttrib();
 
  692         OP_Utils::evalOpParm(result, thissop, 
"cluster_attrib", cookparms.
getCookTime(), 0);
 
  700         if (!thissop) 
return getOutputCenter();
 
  702         OP_Utils::evalOpParm(result, thissop, 
"output_center", cookparms.
getCookTime(), 0);
 
  710         if (!thissop) 
return getControls().entries();
 
  712         OP_Utils::evalOpParm(result, thissop, 
"num_controls", cookparms.
getCookTime(), 0);
 
  716     { 
return opinstControls_control_attrib(cookparms, &_idx); }
 
  720         if (!thissop) 
return (myControls(_idx[0]).control_attrib);
 
  722         _parmidx[1-1] = _idx[1-1] + 1;
 
  725         OP_Utils::evalOpParmInst(result, thissop, 
"control_attrib#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
 
  729     { 
return opinstControls_control_weight(cookparms, &_idx); }
 
  733         if (!thissop) 
return (myControls(_idx[0]).control_weight);
 
  735         _parmidx[1-1] = _idx[1-1] + 1;
 
  738         OP_Utils::evalOpParmInst(result, thissop, 
"control_weight#", _parmidx, cookparms.
getCookTime(), 0, 2-1);
 
  747         if (!thissop) 
return getIterations();
 
  749         OP_Utils::evalOpParm(result, thissop, 
"iterations", cookparms.
getCookTime(), 0);
 
  757         if (!thissop) 
return getRandomSeed();
 
  759         OP_Utils::evalOpParm(result, thissop, 
"random_seed", cookparms.
getCookTime(), 0);
 
  767         if (!thissop) 
return getThresholdAttrib();
 
  769         OP_Utils::evalOpParm(result, thissop, 
"threshold_attrib", cookparms.
getCookTime(), 0);
 
  777         if (!thissop) 
return getThresholdWeight();
 
  779         OP_Utils::evalOpParm(result, thissop, 
"threshold_weight", cookparms.
getCookTime(), 0);
 
  787         if (!thissop) 
return getInitialThreshold();
 
  789         OP_Utils::evalOpParm(result, thissop, 
"initial_threshold", cookparms.
getCookTime(), 0);
 
  797         if (!thissop) 
return getFinalThreshold();
 
  799         OP_Utils::evalOpParm(result, thissop, 
"final_threshold", cookparms.
getCookTime(), 0);
 
  807         if (!thissop) 
return getUseLInf();
 
  809         OP_Utils::evalOpParm(result, thissop, 
"use_linf", cookparms.
getCookTime(), 0);
 
  817         if (!thissop) 
return getKMeanPP();
 
  819         OP_Utils::evalOpParm(result, thissop, 
"kmeanpp", cookparms.
getCookTime(), 0);
 
void setIterations(int64 val)
 
virtual NodeIdx getInput(NodeIdx idx, OP_InputIdx input, bool markused=false) const =0
 
void setClusterAttrib(const UT_StringHolder &val)
 
fpreal64 opinstControls_control_weight(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const 
 
GLenum GLuint GLenum GLsizei const GLchar * buf
 
static void loadData(UT_IStream &is, UT_Vector4I &v)
 
fpreal64 opFinalThreshold(const SOP_NodeVerb::CookParms &cookparms) const 
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
 
UT_StringHolder createString(const UT_Array< Controls > &list) const 
 
SOP_Node * getNode() const 
 
bool opKMeanPP(const SOP_NodeVerb::CookParms &cookparms) const 
 
static void loadData(UT_IStream &is, UT_Vector4D &v)
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
 
UT_StringHolder opThresholdAttrib(const SOP_NodeVerb::CookParms &cookparms) const 
 
exint bread(int32 *buffer, exint asize=1)
 
GT_API const UT_StringHolder time
 
constexpr SYS_FORCE_INLINE T & y() noexcept
 
int64 getRandomSeed() const 
 
static void loadData(UT_IStream &is, UT_Vector2D &v)
 
static void saveData(std::ostream &os, PRM_DataItemHandle s)
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
 
GLsizei const GLfloat * value
 
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
 
static void saveData(std::ostream &os, int64 v)
 
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const 
 
void setKMeanPP(bool val)
 
static void loadData(UT_IStream &is, UT_Vector3I &v)
 
const OP_Context & context() const 
 
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
 
constexpr SYS_FORCE_INLINE T & z() noexcept
 
SYS_FORCE_INLINE const char * buffer() const 
 
static void loadData(UT_IStream &is, fpreal64 &v)
 
ParmType getNestParmType(TempIndex fieldnum) const override
 
GLuint GLsizei GLsizei * length
 
An output stream object that owns its own string buffer storage. 
 
fpreal64 opControls_control_weight(const SOP_NodeVerb::CookParms &cookparms, int _idx) const 
 
static void saveData(std::ostream &os, UT_Vector3D v)
 
void setControls(const UT_Array< Controls > &val)
 
void copyFrom(const OP_NodeParms *src) override
 
**But if you need a result
 
T clampMinValue(fpreal minvalue, const T &src) const 
 
void save(std::ostream &os) const 
 
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const 
 
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
 
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer. 
 
bool load(UT_IStream &is)
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
 
constexpr SYS_FORCE_INLINE T & x() noexcept
 
fpreal64 getInitialThreshold() const 
 
static void loadData(UT_IStream &is, UT_Vector3D &v)
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
 
GLuint GLsizei const GLuint const GLintptr * offsets
 
const UT_Array< Controls > & getControls() const 
 
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
 
constexpr SYS_FORCE_INLINE T & x() noexcept
 
static void saveData(std::ostream &os, UT_Vector4D v)
 
void loadFromOpSubclass(const LoadParms &loadparms) override
 
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
 
bool isParmColorRamp(exint idx) const override
 
void setThresholdWeight(fpreal64 val)
 
void setRandomSeed(int64 val)
 
bool operator==(const Controls &src) const 
 
fpreal64 getFinalThreshold() const 
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
 
int64 getIterations() const 
 
SYS_FORCE_INLINE const char * buffer() const 
 
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr. 
 
constexpr SYS_FORCE_INLINE T & z() noexcept
 
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
 
static void loadData(UT_IStream &is, UT_Vector2I &v)
 
static void saveData(std::ostream &os, UT_Matrix3D v)
 
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
 
static void saveData(std::ostream &os, fpreal64 v)
 
exint read(bool *array, exint sz=1)
 
const OP_GraphProxy * graph() const 
 
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
 
void setOutputCenter(bool val)
 
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
 
void setUseLInf(bool val)
 
static void loadData(UT_IStream &is, bool &v)
 
static void loadData(UT_IStream &is, UT_Matrix3D &v)
 
bool operator!=(const Controls &src) const 
 
static void saveData(std::ostream &os, UT_StringHolder s)
 
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
 
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const 
 
static void saveData(std::ostream &os, UT_Matrix2D v)
 
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
 
SYS_FORCE_INLINE void strcat(const char *src)
 
void saveBinary(std::ostream &os) const 
Save string to binary stream. 
 
GT_API const UT_StringHolder version
 
exint entries() const 
Alias of size(). size() is preferred. 
 
exint opControls(const SOP_NodeVerb::CookParms &cookparms) const 
 
UT_StringHolder opControls_control_attrib(const SOP_NodeVerb::CookParms &cookparms, int _idx) const 
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
 
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
 
static void loadData(UT_IStream &is, UT_StringHolder &v)
 
void coerceValue(T &result, const S &src) const 
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
 
int64 getNumClusters() const 
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
 
const UT_StringHolder & getThresholdAttrib() const 
 
const char * getNestParmName(TempIndex fieldnum) const override
 
bool opUseLInf(const SOP_NodeVerb::CookParms &cookparms) const 
 
bool operator!=(const SOP_ClusterParms &src) const 
 
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
 
DEP_MicroNode * depnode() const 
 
Utility class for containing a color ramp. 
 
exint getNestNumParms(TempIndex idx) const override
 
constexpr SYS_FORCE_INLINE T & w() noexcept
 
SYS_FORCE_INLINE void append(char character)
 
UT_StringHolder opinstControls_control_attrib(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const 
 
virtual UT_StringHolder baseGetSignature() const 
 
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
 
void setInitialThreshold(fpreal64 val)
 
fpreal getCookTime() const 
 
void setThresholdAttrib(const UT_StringHolder &val)
 
static void saveData(std::ostream &os, UT_Vector2D v)
 
fpreal64 opThresholdWeight(const SOP_NodeVerb::CookParms &cookparms) const 
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
 
const UT_StringHolder & getClusterAttrib() const 
 
void setFinalThreshold(fpreal64 val)
 
bool opOutputCenter(const SOP_NodeVerb::CookParms &cookparms) const 
 
const char * findChar(int c) const 
 
int64 opRandomSeed(const SOP_NodeVerb::CookParms &cookparms) const 
 
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
 
void setNumClusters(int64 val)
 
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
 
UT_StringHolder control_attrib
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
 
static void loadData(UT_IStream &is, UT_Matrix2D &v)
 
constexpr SYS_FORCE_INLINE T & y() noexcept
 
bool operator==(const SOP_ClusterParms &src) const 
 
static void saveData(std::ostream &os, bool v)
 
static void saveData(std::ostream &os, UT_Matrix4D v)
 
static void loadData(UT_IStream &is, int64 &v)
 
UT_StringHolder opClusterAttrib(const SOP_NodeVerb::CookParms &cookparms) const 
 
fpreal64 opInitialThreshold(const SOP_NodeVerb::CookParms &cookparms) const 
 
virtual bool isDirect() const =0
Direct proxies mirror actual nodes: 
 
int64 opNumClusters(const SOP_NodeVerb::CookParms &cookparms) const 
 
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
 
static void loadData(UT_IStream &is, UT_Matrix4D &v)
 
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
 
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
 
constexpr SYS_FORCE_INLINE T & y() noexcept
 
SYS_FORCE_INLINE bool isstring() const 
 
OP_NodeParms & operator=(const OP_NodeParms &)=default
 
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
 
bool getOutputCenter() const 
 
constexpr SYS_FORCE_INLINE T & x() noexcept
 
fpreal64 getThresholdWeight() const